An attendance sheet in Excel is a grid with students in rows and the days of the month in columns, where each cell holds P, A or L from a drop-down. Four formulas do the rest: COUNTIF for present, absent and leave, the present count divided by days marked for the percentage, ROUNDUP for how many classes a student must attend to reach 75%, and NETWORKDAYS.INTL for the working days in the month. This guide builds the register step by step and shows the result Excel returns for each formula.
Who this is for and what you will have at the end
This is for class teachers, tutors and coaching institutes that keep a daily register, class representatives who track attendance for a teacher, and students who want to check their own position against a 75% rule. It also makes a good Excel practical because it uses dates, drop-downs, COUNTIF and conditional formatting in one sheet.
By the end you will have:
- A monthly register where the dates and weekday names fill in from one start date.
- P, A, L and H drop-downs that reject anything else.
- Sundays and holidays shaded automatically.
- Present, absent and leave counts, attendance percentage and a below-target warning for each student.
- The number of classes each student must attend in a row to reach the minimum, or how many they can still miss.
Prerequisites
- Excel 2016 or later, or Excel for Microsoft 365. Everything here also works in Excel 2010 and 2013.
- The student list (roll number and name), the month's start date, your weekly off day and the holiday dates.
- The minimum attendance rule of your school, college or board. The examples use 75%; replace it with your own figure.
Lay out the register
Use one sheet per month. The examples use this layout:
| Cells | Holds |
|---|---|
| B1 | The first day of the month, such as 01-Apr-2026 |
| C3:AG3 | Dates 1 to 31 (formulas) |
| C4:AG4 | Weekday names (formulas) |
| A5:A64 | Roll numbers |
| B5:B64 | Student names |
| C5:AG64 | P, A, L or H for each day |
| AH5:AL64 | Present, absent, leave, days marked, percentage |
Type the first day of the month in B1. In C3, enter a formula that works out the day number from the column and stays blank after the last day of the month:
=IF(COLUMN()-2>DAY(EOMONTH($B$1,0)),"",$B$1+COLUMN()-3)Column C is column 3, so C3 is day 1, D3 is day 2 and AG3 is day 31; copy the formula across without changing it. EOMONTH($B$1,0) returns the last day of the same month, and DAY of that date is 30 for April, 31 for May and 28 for February 2026, so the columns after the month ends show nothing. Format C3:AG3 with the custom number format d to show just the day number. If you insert a column before C, change the 2 and 3 in the formula to match.
For weekday names in row 4, use CHOOSE with WEEKDAY. With no second argument WEEKDAY returns 1 for Sunday through 7 for Saturday:
=IF(C3="","",CHOOSE(WEEKDAY(C3),"Su","Mo","Tu","We","Th","Fr","Sa"))=TEXT(C3,"ddd") also works in English versions of Excel, but the format code depends on the language Excel is set to, while CHOOSE gives the same labels everywhere. Copy both formulas across to AG. To use the sheet for the next month, copy the sheet, change B1 and clear the attendance cells.
Step 1: Add P, A, L and H drop-downs
- Select C5:AG64.
- Open Data > Data Validation.
- Under Allow, choose List.
- In Source, type P,A,L,H and click OK.
Every cell now shows a drop-down, and Excel rejects other entries such as O or a space. Use P for present, A for absent, L for leave and H for a holiday or a day with no class. Optional: on the Input Message tab of the same dialog, add a short reminder of the four codes so it appears when a cell is selected.
To fill a whole day quickly, type P in the first student's cell, copy it, select the rest of that column and paste, then change the absentees to A.
Step 2: Count present, absent and leave
In AH5, AI5 and AJ5, count each code across the student's row:
=COUNTIF(C5:AG5,"P")
=COUNTIF(C5:AG5,"A")
=COUNTIF(C5:AG5,"L")In AK5, add them to get the days marked:
=AH5+AI5+AJ5COUNTIF is not case-sensitive, so a lowercase p still counts as present. H is not counted anywhere, which is what you want for a holiday or a cancelled class. Copy the four formulas down to row 64.
Step 3: Attendance percentage
Divide days present by days marked:
=IF(AK5=0,"",AH5/AK5)Apply Percent Style with one decimal place. The IF returns an empty cell for a student with nothing marked yet, instead of #DIV/0!.
Dividing by days marked rather than by every date in the month has two advantages. Sundays and holidays never lower anyone's percentage, and a student who joins in the middle of the month is measured only on the days since joining.
If your institution counts approved leave as attendance, add the leave count to the top:
=IF(AK5=0,"",(AH5+AJ5)/AK5)A student with 7 days present, 1 absent and 1 on leave, plus one holiday marked H, has 9 days marked. Without leave counted the result is 7 / 9 = 77.8%; with leave counted it is 8 / 9 = 88.9%.
Step 4: Check the 75% rule and the classes needed
Put the minimum in a cell of its own, for example AL2 = 75%, and flag every student below it:
=IF(AL5="","",IF(AL5>=$AL$2,"On track","Below target"))The more useful number for a student is how many classes in a row they must attend to get back to the minimum. If they have attended P classes out of T, and attend the next x classes, the new percentage is (P + x) / (T + x). Setting that equal to the target t and solving for x gives:
x = (t * T - P) / (1 - t)Round up, because half a class does not exist. With P in AH5 and T in AK5:
=IF(AL5>=$AL$2,0,ROUNDUP(($AL$2*AK5-AH5)/(1-$AL$2),0))Worked example: 49 classes attended out of 78 is 62.8%. At a 75% target, (0.75 x 78 - 49) / 0.25 = (58.5 - 49) / 0.25 = 38, so the student must attend the next 38 classes without a break. Check: (49 + 38) / (78 + 38) = 87 / 116 = 75.0%.
For a student above the target, the number of classes they can still miss and stay at the minimum is:
=IF(AL5<$AL$2,0,ROUNDDOWN((AH5-$AL$2*AK5)/$AL$2,0))With 71 attended out of 78 (91.0%), (71 - 58.5) / 0.75 = 16.67, rounded down to 16. Check: 71 / (78 + 16) = 75.5%, while missing 17 would give 71 / 95 = 74.7%.
Both formulas need a target below 100%, since 1 - t is in the bottom of the first one. For a student who wants this for their own subjects rather than a whole class, the free attendance calculator does the same sums in the browser.
Step 5: Shade Sundays and holidays
List the holiday dates in a column on a Settings sheet, for example Settings!E4:E40, and give the range a name: select it, click the Name Box left of the formula bar, type Holidays and press Enter.
Then select C3:AG64 and add a conditional formatting rule (Home > Conditional Formatting > New Rule > Use a formula to determine which cells to format):
=AND(C$3<>"",OR(WEEKDAY(C$3)=1,COUNTIF(Holidays,C$3)>0))Pick a light gray fill. The dollar sign before 3 keeps every row looking at the date row, so the whole column of a Sunday or holiday turns gray. WEEKDAY(...)=1 is Sunday; for a Saturday off as well, add WEEKDAY(C$3)=7 inside the OR.
A second rule with =C5="A" and a light red fill, applied to C5:AG64, makes absences easy to spot.
Working days in the month
To show the number of working days at the top of the sheet, use NETWORKDAYS.INTL. Its third argument sets the weekend; Microsoft's page lists 11 as Sunday only and 1 (the default) as Saturday and Sunday:
=NETWORKDAYS.INTL($B$1,EOMONTH($B$1,0),11,Holidays)For April 2026 with no holidays, this returns 26: thirty days minus four Sundays. For August 2026 with 15 August in the holiday list, it returns 25: thirty-one days minus five Sundays and the holiday.
Step 6: Daily totals and the session summary
Under the last student, count how many were present on each day:
=IF(C$3="","",COUNTIF(C5:C64,"P"))Copy it across. A drop on one day stands out at once, for example on the day of a local event.
For the whole session, keep the twelve month sheets next to each other in the tab bar (named Month 1 to Month 12, say) and add the same cell across all of them with a 3-D reference on a summary sheet:
=SUM('Month 1:Month 12'!AH5)This adds AH5 on every sheet from Month 1 to Month 12, so it gives the session's total days present for the student in row 5. Do the same for days marked and divide for the session percentage. A 3-D reference covers every sheet between the first and last name, so do not put the summary sheet between them.
Common errors and fixes
| What you see | Why | Fix |
|---|---|---|
| #DIV/0! in the percentage | No days marked yet | Wrap it: =IF(AK5=0,"",AH5/AK5) |
| Percentage looks too low | Divided by all dates in the month | Divide by days marked (P + A + L) |
| A day's P is not counted | A space or the letter O was typed | Use the P,A,L,H drop-down from Step 1 |
| Column 31 shows 1 of next month | The date formula has no end-of-month check | Use the EOMONTH version in row 3 |
| Sundays not shaded | The rule does not lock the row, or uses the wrong row | Use C$3 in the rule and apply it from row 3 |
| Classes needed shows a negative number | The student is already above target | Use the IF version that returns 0 |
| Session total is wrong | A sheet was moved outside Month 1 to Month 12 | Keep the month sheets together in the tab bar |
For the 3-D references and month copies, keep the sheet names exactly the same in every formula.
Download the free attendance register
EpiFive's free Class Attendance Register (ZIP, about 190 KB) is this whole guide built for 60 students and a full 12-month session, with a filled sample and a blank copy.
- Settings: school and class, session start, minimum attendance, whether leave counts as present, one or two weekly off days and a holiday list.
- Students: roll numbers and names, entered once for all twelve months.
- Month 1 to Month 12: dates and weekdays from the session start, P/A/L/H drop-downs, weekly offs and holidays shaded, per-student totals and percentage, and daily totals.
- Year Summary: month-by-month percentage for every student, session totals, On track or Below target, classes to attend in a row and classes that can still be missed.
It has no macros and is free for teaching and classroom use. If you also keep marks for the same class, the marksheet guide builds the result sheet and report card the same way.
Checklist
- B1 holds the first day of the month, and the date row blanks out after the month ends.
- Attendance cells use the P,A,L,H drop-down.
- COUNTIF counts P, A and L separately, and days marked is their sum.
- The percentage divides by days marked, with an IF for empty rows.
- The minimum is in its own cell, and the classes-needed formula refers to it.
- Sundays and holidays are shaded from the date row, and NETWORKDAYS.INTL shows working days.
- Month sheets sit together if a summary adds across them.
What we checked
- Built a 12-month, 60-student register with these formulas and recalculated it in desktop Excel for Microsoft 365 on Windows on 2026-12-03. Excel reported no error values in the filled sample or the blank copy (8,284 formulas).
- Confirmed in the same Excel that =NETWORKDAYS.INTL(DATE(2026,4,1),DATE(2026,4,30),11) returns 26, and that August 2026 with 15 August as a holiday returns 25. The register's own working-day counts for those months matched.
- Recalculated the 75% examples by hand and in Excel: ROUNDUP((0.75 x 78 - 49) / 0.25, 0) = 38, and ROUNDDOWN((71 - 58.5) / 0.75, 0) = 16. The checks 87 / 116 = 75.0% and 71 / 94 = 75.5% hold.
- Checked COUNTIF on a row of P, A, L and H: 7 P out of 9 days marked gave 77.8%, H was not counted, and the criterion "p" also counted P (COUNTIF is not case-sensitive).
- Opened Microsoft's WEEKDAY page on 2026-12-03: return type 1 or omitted gives 1 (Sunday) through 7 (Saturday). Opened the NETWORKDAYS.INTL page the same day: weekend number 11 is Sunday only and 1 or omitted is Saturday and Sunday.
- Not checked: Google Sheets, LibreOffice Calc and Excel for Mac were not tested. The 75% figure is an example; minimum attendance rules differ between boards, universities and institutes.
Last tested: 2026-12-03
References
- Microsoft Support: COUNTIF function
- Microsoft Support: WEEKDAY function
- Microsoft Support: NETWORKDAYS.INTL function
- Microsoft Support: EOMONTH function
- Microsoft Support: ROUNDUP function
- Microsoft Support: ROUNDDOWN function
- Microsoft Support: Apply data validation to cells
- Microsoft Support: Use conditional formatting to highlight information
Comments
Questions and tips are welcome. Comments are checked by the EpiFive team before they appear; please do not share passwords, phone numbers or other private details.