You can build a working attendance tracker in Excel in about fifteen minutes using three things: a name column, one column per day, and a COUNTIF formula to total the marks. The tracker is just a grid of people down the left and dates across the top, where each cell holds a short code such as P for present, A for absent, or L for late. Once the grid exists, formulas do all the counting. No add-ins or templates are required, and the same method works in Excel for Microsoft 365, Excel 2021, Excel for Mac, and Excel on the web, though ribbon and menu labels can differ slightly by version, device and region.
What You'll Need
- Excel on any platform (desktop, Mac, or the free web version). Google Sheets also accepts these formulas, but the steps below describe Excel.
- A list of names and a date range you want to track, such as one month or one school term.
- A code system you will stick to. Keep it to a handful of single letters so typing stays fast and formulas stay simple.
- Optional: a second sheet for names and a third for monthly summaries, but one sheet is enough to start.
Step-by-Step
- Decide your codes and write them down. A common set is P (present), A (absent), L (late), and E (excused). Use one letter per code. Single letters make the sheet fast to fill in and let formulas count with a simple pattern. Avoid symbols like checkmarks unless you only ever want a visual tally, because text formulas cannot easily sum them.
- Set up the header row. In cell A1 type a label such as Name. In B1 type the first date of your period. Do not type every date by hand: click B1, grab the small square at the bottom-right corner of the cell (the fill handle), and drag right to fill the dates automatically. If Excel fills something unexpected, type the second date in C1, select both cells, then drag.
- Format the date row. Select the date cells, right-click, choose Format Cells, and pick a short date format such as 5-Dec or just the day number. Short formats keep columns narrow so a full year fits on one screen. If you want the weekday visible, use a custom format like
ddd dto show Mon 5. - Enter the names. Type names in column A starting at A2, one per row. Leave no blank rows inside the list, because blank rows break count formulas and sorting. If your list is long, type the first two names and use the fill handle to extend the pattern only when the names follow an actual pattern; otherwise type them individually.
- Fill in the marks. Go down each column and type the code for each person. If most people are present, type P in the first cell, copy it, select the rest of the column, and paste, then change the exceptions to A, L or E. Typing the majority value first and editing the few exceptions is much faster than typing every cell.
- Add a total per person. In the first empty column after the dates, type a header such as Days Present. In the cell below, enter a formula like
=COUNTIF(B2:AF2,"P"), adjusting the range so it covers exactly the marked cells for that person. Press Enter and drag the fill handle down the column. Do the same in the next columns for absent and late counts. - Add a total per day. Below the last person's row, leave one blank row and add a label such as Present today. Use
=COUNTIF(B2:B30,"P")for the first date column and drag right. This gives you a daily headcount you can compare against your expected total. - Add an attendance rate. In a new column, divide days present by total days recorded. To avoid errors when a period is empty, wrap it:
=IFERROR(COUNTIF(B2:AF2,"P")/COUNTA(B2:AF2),""). Format the column as a percentage with Format Cells. This makes patterns obvious at a glance. - Add conditional formatting. Select the marking area, then use Home > Conditional Formatting > Highlight Cells Rules to colour A red and L amber. This turns the sheet into a visual heat map and makes repeat absentees easy to spot without counting anything.
- Freeze the headers. Click the cell just below and to the right of the frozen area you want, then use View > Freeze Panes. Usually you freeze row 1 and column A so names and dates stay visible as you scroll.
- Protect the formulas. Select the count cells, use Format Cells to unlock them if needed, then review the sheet with Review > Protect Sheet. This stops accidental edits to totals when several people use the file. Note the password before you set it; a lost sheet password can be difficult to recover.
- Copy the sheet for each new month. Right-click the sheet tab, choose Move or Copy, tick Create a copy, rename it, and clear the marks while keeping the names and formulas. This keeps one tidy file per period instead of a sprawling single sheet.
Common Mistakes
- Mixing codes. Half the sheet says P and half says Present, so the count misses half the data. Pick one letter per code and never vary it.
- Ranges that drift. A formula covering B2:Z2 copied to a row with different data stops matching. Use consistent ranges or a table so ranges expand automatically.
- Blank rows inside the list. These silently break totals and sorting. Keep the list contiguous.
- Typing dates as text. If dates do not right-align, Excel may be treating them as text and the fill handle will not create a sequence. Re-enter them in a recognised date format.
- Counters inside the marking range. Placing totals in the middle of the grid makes
COUNTIFcount its own output. Keep summary columns outside the marked area.
Tips
- Convert the grid to an Excel Table (Insert > Table). Tables extend formulas automatically as you add rows or columns.
- Use data validation on the marking cells (Data > Data Validation, list of P,A,L,E) so only valid codes can be entered.
- Enter dates as real dates, not text, so you can filter by week or month later.
- Keep one column per day rather than one cell holding several codes; separate cells are what make counting possible.
- If you track several groups, add a Group column so you can filter and total by team.
Troubleshooting
Totals show zero. Check for stray spaces: a cell containing "P " will not match "P". Use Find and Replace to strip trailing spaces, or trim with TRIM.
The fill handle copies the same date everywhere. Excel did not recognise the entry as a date. Re-enter it in a format Excel accepts and try again.
Formulas show #VALUE! or #DIV/0!. Usually a text cell where a number is expected or a division by an empty range. Wrap the calculation in IFERROR as shown above.
Conditional formatting colours the wrong cells. The rule range probably does not match the marking area. Reopen the rule manager and confirm the range.
Someone overwrote a formula. Undo immediately with Ctrl+Z (Cmd+Z on Mac). If the file was already closed, restore a previous version via the file's version history in your cloud storage.
The file gets slow with a full year. Split by month into separate sheets and sum the monthly totals, rather than one giant grid.
Frequently Asked Questions
Can I count half days?
Yes. Use a decimal mark such as 0.5 in the cell, or add a separate Half day column, and adjust the formulas to sum values instead of counting letters.
Does this work in Excel on the web?
Yes. All the formulas and conditional formatting described here work in Excel for the web, though some formatting options are arranged differently.
How do I track a week rather than every day?
Use one column per week with codes W (whole week present), or keep daily columns and add a weekly total row that sums the five day columns.
Can I export the totals for payroll or reporting?
Select the summary columns and copy them into a new sheet, or use Save As to create a CSV copy if your payroll system imports that format.
What if I need to add a person mid-month?
Insert a row above the last person and copy the formula row down. If you used an Excel Table, the formulas extend automatically.
Can two people edit it at once?
If the file lives in OneDrive or SharePoint, co-authoring works in supported Excel versions, but agree on who edits which column to avoid conflicting marks.