Step 1 – Creating a Month and Year Menu
- Go to any cell (i.e. C4) and insert the following formula:
=Month
- Open another sheet and enter all the months.
- Return to the first worksheet and select the cell where you previously put the formula.
- Go to the Data tab and select Data Validation.
- The Data Validation window opens.
- Go to Settings and select List in the Allow tab.
- Choose the list of the months in another worksheet in the Source option and press OK.
- You will see the following result.
- Select another blank cell(i.e. C5) and enter the following formula:
=year
- In the next cell, repeat the same steps that were performed for the month Select Cell > Data > Data Validation.
- The Data Validation window opens. Enter 2020,2021,2022 in the Source and press OK.
- You will get a result similar to the following image.
Read More: Attendance and Overtime Calculation Sheet in Excel
Step 2 – Inputting a Start and End Date of the Month
- Go to any blank cell and insert the following formula:
=DATEVALUE( "1" &C4 &C5)
- Press enter to find the below result.
- Go to another blank cell and insert the following formula:
=EOMONTH(E4,0)
- You will get a result similar to the following image.
Step 3 – Inserting Dates Using IF Function.
- Enter the people’s names. (We have Serial No. in cell B7 and Name in cell C7).
- Select any blank cell and refer to the starting date (in this case =E4) you created in the previous step.
- Right-click on the cell and select Format Cells.
- In the Format Cells window, go to Custom and type dd in the Type option. Press OK.
- You will get the below result.
- Select the blank cell next to the previous cell and insert the following formula:
=IF(D7<$H$4+1,D7+1,””)
- You will get this result.
- Use Fill Handle to fill in all the dates of the month.
Step 4 – Utilizing TEXT Function to Input Days
- Select the cell below the first date (i.e. cell D7) and insert the following formula:
=TEXT(D7,"ddd")
- You will get the desired result.
- Use Fill Handle to get all the days of the month.
Step 5 – Highlighting Sundays in the Worksheet
- Select the cell below the first day of the month and then go to the Home tab.
- Go to Conditional Formatting and select the New Rule option.
- In the New Formatting Rule window box, select the desired cell in the format value box:
=D$9="Sun"
- If you chose the Format option in the previous step, the Format Cells will appear on the screen.
- Select the desired color from the Fill tab and press OK.
- Select the cell you have used for the conditional formatting.
- Select the Format Painter option and use Fill Handle to select all the cells to which you want this condition to apply.
- You will get results similar to the below image.
Step 6 – Restricting Data Entry on a Weekend
- Select the first day of the month (i.e. cell D8) and choose Data Validation from the Data tab.
- Select Custom in the Allow section.
- Click Formula in the Setting tab under Data Validation.
- Enter the following formula:
=D$8<>"Sun"
- Press OK.
- In the Error Alert tab, choose a Title and Error message and press OK.
- Apply this to all desired cells using the Fill Handle.
- You will get the below result.
Step 7 – Tracking Present and Absent Days
- Enter the data of all names and create Present and Absent headings in two cells.
- In the first cell under the Present heading, enter the following formula:
=COUNTIF(D9:AE9,"P")
- In the first cell under the Absent heading, insert the following formula:
=COUNTIF(D9:AE9,"A")
- Use the Fill Handle to apply these formulas to the desired cells to get the below result.
Read More: How to Create a Monthly Staff Attendance Sheet in Excel
Step 8 – Saving a Desired File as a Template
- You want to save the whole datasheet as a Template file.
- Choose the File option and press Save As. Save the file with the desired name.
Read More: Attendance Sheet in Excel with Formula for Half Day
Download the Practice Workbook
You can download the practice workbook from here.
Related Articles
- How to Create Employee Attendance Sheet with Time in Excel
- Labour Attendance Sheet Format in Excel
- How to Create Biometric Attendance Report in Excel
- How to Create Training Attendance Sheet in Excel
- How to Prepare a Meeting Attendance Sheet in Excel
- How to Create Attendance Sheet with Time in and Out in Excel
<< Go Back to Employee Attendance Sheet Excel | Excel HR Templates | Excel Templates
Get FREE Advanced Excel Exercises with Solutions!
I made this tracker, however, whenever I add ‘A’ or ‘P’ it doesn’t change with the month, it just stays in the specific cell.
Dear Sam,
Thank you for your comment. I understand that you are looking for a more dynamic Attendance Sheet, if so, you can use the following VBA code as an update:
Download this Excel file for a better understanding.
I hope that your problem will be solved now. If you have any further issue, please let us know in the comment section.
Best
Afia Aziz Kona
Excel and VBA Content Developer
Exceldemy