How to Create an Automated Attendance Sheet in Excel – 8 Easy Steps

This is the sample dataset.

how to make automated attendance sheet in excel

 

Step 1 – Creating a Support Sheet for an Automated Attendance Sheet in Excel

  • In the Month Name column, enter the names of the 12 months.

how to make automated attendance sheet in excel Constructing Support Sheet

  • In the National Holidays column, enter the list of National Holidays.

  • Enter the name of the weekdays in the Weekday column.

how to make automated attendance sheet in excel Constructing Support Sheet


Step 2 – Creating a Month and Year List for an Attendance Sheet with Excel Data Validation

 

  • Select C4.
  • Go to the Data tab.
  • Click Data Validation in Data Tools.

how to make automated attendance sheet in excel Creating Month and Year List

The Data Validation dialog box will open.

  • In Allow, select List.

how to make automated attendance sheet in excel Creating Month and Year List

  • In Source, click the upward arrow.

how to make automated attendance sheet in excel Creating Month and Year List

  • Select all the months in the Month Name column of the Support Sheet.

how to make automated attendance sheet in excel Creating Month and Year List

  • Click OK.

how to make automated attendance sheet in excel Creating Month and Year List

A drop-down icon will be displayed beside C4.

  • Select a month. Here, July.

how to make automated attendance sheet in excel Creating Month and Year List

  • Click C5.
  • Go to the Data tab.
  • Click Data Validation in Data Tools.

how to make automated attendance sheet in excel Creating Month and Year List

  • Choose List.
  • In the Source box, enter the years.
  • Click OK.

how to make automated attendance sheet in excel Creating Month and Year List

A drop-down button will be displayed beside C5.

how to make automated attendance sheet in excel Creating Month and Year List

  • Choose a year. Here, 2022.

Create the start and end date of each month using the DATEVALUE function and the EOMONTH function.

  • In C7 enter the following formula.
=DATEVALUE("1"&C4&C5)

C4 indicates the chosen Month and C5 represents the selected Year.

  • Press ENTER.

how to make automated attendance sheet in excel Creating Month and Year List

This is the output.

  • In E7, enter the following formula.
=DATEVALUE("1"&C4&C5)

C7 represents the start date of the month, and 0 means that the function will return the last date of the current month.

  • Press ENTER.

how to make automated attendance sheet in excel Creating Month and Year List

You will get the end date of the selected month. Here, 31 July (31 Jul).

how to make automated attendance sheet in excel Creating Month and Year List


Step 3 – Assigning Weekends in the Automated Attendance Sheet in Excel

  • Select C9.
  • Go to the Data tab.
  • Select Data Validation.

how to make automated attendance sheet in excel Assigning Weekly Off Days

  • In the Data Validation dialog box, choose List.
  • In Source, click the upward arrow.

  • Select the weekdays in the Weekday column of the Support Sheet.
  • Click the downward arrow.

how to make automated attendance sheet in excel Assigning Weekly Off Days

  • Click OK.

  • A drop-down button will be displayed beside C9. Click it.
  • Choose a weekly day off. Here, Saturday (Sat).

how to make automated attendance sheet in excel Assigning Weekly Off Days

Saturday (Sat) is selected as the weekly day off.

  • Follow the same steps to select another weekly day off. Here, Sunday (Sun).

how to make automated attendance sheet in excel Assigning Weekly Off Days


Step 4 – Entering Dates and Weekdays in the Attendance Sheet

 

  • In F11 enter the following formula.
=C7
  • Press ENTER.

how to make automated attendance sheet in excel Entering Dates and Weekdays

Change the cell format.

how to make automated attendance sheet in excel Entering Dates and Weekdays

  • Right-click F11.
  • Select Format Cells.

The Format Cells dialog box will open.

how to make automated attendance sheet in excel Entering Dates and Weekdays

  • Click Custom.
  • Enter dd in Type.
  • Click OK.

This is the output.

how to make automated attendance sheet in excel Entering Dates and Weekdays

To obtain the rest of the days of the selected month, use the IF function. The logic is if the cell value is less than the end date of the month, the function increases the cell value by 1 (1 day). If this condition isn’t true, it replaces the cell with a blank.

  • Use the following formula in G11.
=IF(F11<$E$7,F11+1,"")

F11 is the 1st date of the month. $E$7 is the end date of the selected month.

Note:  Absolute Cell Referencing for E7 ($E$7) was used.

how to make automated attendance sheet in excel Entering Dates and Weekdays

  • Drag the Fill Handle to see the rest of the days of the selected month.

To enter the names of the weekdays:

  • Enter the formula below in F12.
=TEXT(F11,"ddd")

ddd is the date format. The output will contain the first 3 letters of weekdays.

  • Press ENTER.

how to make automated attendance sheet in excel Entering Dates and Weekdays

  • Drag the Fill Handle to see the rest of the data.

how to make automated attendance sheet in excel Entering Dates and Weekdays


Step 5 – Using Conditional Formatting to Highlight Weekends

  • Select F13.
  • Select Conditional Formatting.
  • Choose New Rule.

The New Formatting Rule dialog box will open.

how to make automated attendance sheet in excel Using Conditional Formatting for Off Days

  • Select Use a formula to determine which cells to format.
  • Enter the following formula in  Format values where this formula is true.
=F$12=$D$9

$D$9 represents a Weekly Day Off (Sunday).

  • Click Format option and select a formatting option.
  • Click OK.

how to make automated attendance sheet in excel Using Conditional Formatting for Off Days

Note:  Absolute Cell Referencing was used for D9 ($D$9). In F12 only the Row Number was fixed. This will allow you to copy the formatting to all cells in the same row.

  • Select the created rule.
  • Click Duplicate Rule.

  • Select the duplicated rule and click Edit Rule.

how to make automated attendance sheet in excel Using Conditional Formatting for Off Days

  • Enter the following formula in Format values where this formula is true.
=F$12=$C$9

$C$9 indicates the other Weekly Day Off (Saturday).

  • Click OK.

how to make automated attendance sheet in excel Using Conditional Formatting for Off Days

  • Click Apply in the Conditional Formatting Rules Manager dialog box.
  • Click OK.

  • Follow the previously described steps to open the New Formatting Rule dialog box.

how to make automated attendance sheet in excel Using Conditional Formatting for Off Days

  • Select Use a formula to determine which cells to format.
  • Enter the following formula in Format values where this formula is true.
=MATCH(F$11,'Support Sheet'!$C$5:$C$15,0)
  • Click Format option and select a formatting option.
  • Click OK.

how to make automated attendance sheet in excel Using Conditional Formatting for Off Days

Note: The MATCH function was used to highlight National Holidays.

  • Select Apply.
  • Click OK.

  • Select F13.
  • Click the Format Painter icon.

  • Select F13:AJ17 to paste the copied formatting.

how to make automated attendance sheet in excel Using Conditional Formatting for Off Days

This is the output.

how to make automated attendance sheet in excel Using Conditional Formatting for Off Days


Step 6 – Entering Attendance Data in the Automated Attendance Sheet in Excel

  • Select  F13:AJ17.
  • Go to the Data tab.
  • Click Data Validation.

how to make automated attendance sheet in excel Inserting Attendance Data

  • In the Data Validation dialog box, choose List.
  • In Source, enter P,A.
  • Click OK.

how to make automated attendance sheet in excel Inserting Attendance Data

  • Click the drop-down button beside F13.
  • Choose P for present and A for absent.

  • Enter relevant attendance records in the other cells.

how to make automated attendance sheet in excel Inserting Attendance Data


Step 7 – Using the Excel COUNTIF Function to Automatically Count Attendance

  • Enter the following formula in AK13.
=COUNTIF(F13:AJ13,"P")

F13:AJ13 is the range of the sum and P is the sum criteria.

  • Press ENTER.

  • Drag the Fill Handle to see the rest of the data.

how to make automated attendance sheet in excel Using COUNTIF Function

  • Enter the following formula in AL13.
=COUNTIF(F13:AJ13,"A")

A is the sum criteria.

  • Press ENTER.

how to make automated attendance sheet in excel Using COUNTIF Function

  • Drag the Fill Handle to see the output.


Step 8 – Saving the Automated Attendance Sheet as a Template

  • Go to the File tab.

how to make automated attendance sheet in excel

  • Select Save As.

  • Rename the file.
  • Choose Excel Template (*.xltx).
  • Click Save.

how to make automated attendance sheet in excel

  • To check the saved template, click New.
  • Click the Personal tab.

how to make automated attendance sheet in excel

You can see your template.


Things to Remember

  • While saving the file as a Template, use the default path suggested by Excel, which automatically saves the template to the Custom Office Template folder.

Download Practice Workbook


<< Go Back to Formula List | Learn Excel

Get FREE Advanced Excel Exercises with Solutions!
Zahid Hasan
Zahid Hasan

Zahid Hassan, BSc, Industrial and Production Engineering, Bangladesh University of Engineering and Technology, has worked with Exceldmy for 1.5 years. He has written 95+ articles for Exceldemy. He has worked as an Excel & VBA Content Developer. He also worked as a VBA Developer for the Template team. Currently, he is working as a Junior Software Developer for the Excel Add-in project. He is interested in Software Development, Python, VBA, VB.NET, and Data Science, expanding his expertise in... Read Full Bio

2 Comments
  1. Hi, This really looks helpful. However, I need help on determining shift for each employee rather declaring same week off for all employees. For Eg. Employee A will work on Weekends (Sat,Sun) and avail week off on other two days in the week. Please help me on the same. Thanks.

    • Hi VIJAY,
      Thank you for sharing your problem with us. As you wanted to determine each employee’s shift assuming that, their holiday can be any weekday, we have modified the attendance sheet. We hope this solution will meet your requirement.

      1. First, you have to create a new table that will include the preferred work shifts of each employee.
      2. For simplicity, we are going to format these cells based on text value.
      3. So, select the data range F10:L14.

      4. Now, from the Home tab go to Conditional Formatting and Select Format only cells that contain.
      5. Then you have to set Yes as Specific Text.
      6. Also, choose green as the format color.
      7. Then, press the OK button.

      8. Similarly, create another condition that if the cell contains the specific text No, the cell will be formatted as red.

      9. Your selected cells should still be blank.
      10. Now, to indicate the work shift, write Yes or No in these formatted cells.
      11. And, you can see the cells are instantaneously formatted with green and red colors (You can also use Yes or No from the drop-down box instead of writing them manually).

      11. Now, go to the attendance sheet and suppose, there is no condition in this Shift table.
      12. Select the F19 cell and create a new condition.

      13. You have to select Use a formula to determine which cells to format as the New Formatting Rule.
      14. Then, write the following formula in the formula box.
      =INDEX($B$9:$L$14, MATCH($B19,$B$9:$B$14,0),MATCH(F$18,$B$9:$L$9,0))="No"
      15. Also, select a reddish format color and press OK.

      16. Then, use the Fill Handle to copy the conditional formatting for all cells as shown in the following image.
      17. You can see, the Attendance table has been marked by each employee’s preferred off days.

      18. Now, you can select Present (P) or Absent (A) for each employee.

      You may need to modify the conditional format formula according to your data table. Be careful about relative and absolute referencing. You can also check the Excel file from the link below:
      Answer.xlsx
      We hope this comment has been useful to you. Have a nice day.
      Regards
      Sourav
      Exceldemy.

Leave a reply

Advanced Excel Exercises with Solutions PDF

 

 

ExcelDemy
Logo