You can build a working automated attendance tracker in Excel using nothing but built-in functions and a formatted table: one sheet holds your roster, one holds daily marks, and a summary sheet uses COUNTIF and conditional formatting to calculate and colour-code attendance automatically. No add-ins or macros are required, and the same method works in Excel for Microsoft 365, Excel 2021 and Excel 2019 on Windows and Mac.
What You'll Need
- Excel for Microsoft 365, Excel 2021 or Excel 2019 (Windows or Mac). Excel for the web works for most of this, but some formatting options are limited.
- A class, team or staff list with one row per person.
- A consistent set of attendance codes you will type each day (for example P for present, A for absent, L for late, E for excused).
Step-by-Step
- Create the roster sheet. Open a new workbook and rename the first tab Roster. In row 1, add headers: ID, Name, Group. Enter one person per row below. Keep names spelled exactly the same everywhere, because the summary formulas match on text.
- Create the attendance sheet. Add a second tab called Attendance. In A1 put Name. In B1 put the first date (for example 1/9/2025 or your regional format). In C1 put the next date, select B1:C1, and drag the fill handle to the right to generate a column per day. Format row 1 as dates if Excel shows serial numbers.
- Link the names. In A2 of Attendance, type
=Roster!B2and press Enter. Copy that formula down for every person on the roster. Now editing a name on the roster updates it here automatically. - Add data validation to the marking cells. Select the block of cells where you will type attendance (for example B2:AF30). Go to Data > Data Validation. Choose List and enter your codes separated by commas, such as
P,A,L,E. Click OK. This stops typos like pp or Absent that would break the counts. - Build the summary sheet. Add a third tab called Summary. In A1 put Name, B1 Present, C1 Absent, D1 Late, E1 Excused, F1 Attendance %. In A2 type
=Roster!B2and fill down. - Write the counting formulas. In B2 type
=COUNTIF(Attendance!B2:AF2,"P"). In C2 use the same formula with"A", D2 with"L", E2 with"E". Adjust the range to match your real last column and row. Fill all four formulas down the summary. - Calculate the percentage. In F2 type
=IFERROR((B2+D2)/(B2+C2+D2+E2),""). This counts present and late as attended and divides by all marked days. Format column F as a percentage (Home > Number Format > Percentage). Fill down. - Add conditional formatting. On the Attendance sheet, select your marking range and go to Home > Conditional Formatting > New Rule > Format only cells that contain. Set cell value equal to
Aand choose a red fill; repeat forL(amber) andE(grey). Absences now stand out the moment you type them. - Freeze panes and protect the layout. On Attendance, select cell B2 and choose View > Freeze Panes > Freeze Panes so names and dates stay visible while scrolling. If others will type marks, use Review > Protect Sheet and unlock only the marking cells first (Format Cells > Protection > clear Locked).
- Test with sample data. Type a few P, A, L and E marks and confirm the summary counts and percentages change correctly. Clear the test marks before real use.
Menu labels can differ slightly by Excel version, platform and region; on Excel for the web, for example, some dialog wording and formatting options are reduced.
Common Mistakes
- Typing inconsistent codes (P, p, Present) so COUNTIF misses them. Data validation prevents this.
- Hard-typing names on the attendance sheet instead of linking to the roster, which causes mismatches when someone is added or renamed.
- Using a fixed range that stops before the last column, so later dates are never counted.
- Dividing by total calendar days rather than marked days, which understates attendance.
- Leaving merged cells in the data area; formulas and sorting break around them.
Tips
- Convert the attendance area to an Excel Table (Insert > Table) so new date columns extend formulas automatically.
- Use a separate code such as H for holidays and exclude it from the percentage formula.
- Add a Notes column at the far right rather than typing comments into marking cells.
- Keep one workbook per term or month to stop files becoming slow and unwieldy.
- Save a blank copy as a template so each new period starts clean.
Troubleshooting
- Counts stay at zero: check for leading or trailing spaces in the marking cells and confirm the COUNTIF range covers the right columns.
- #REF! errors after inserting columns: re-point the formulas to the new range, or use a Table so references adjust automatically.
- Names show as 0 or blank on the summary: the roster link is broken; re-enter
=Roster!B2and fill down. - Dates appear as numbers: select the header row and apply a date format from Home > Number Format.
- Conditional formatting colours the wrong cells: check the rule's Applies to range and that the rule uses the exact code text.
Frequently Asked Questions
Do I need macros for this?
No. COUNTIF, data validation and conditional formatting handle the automation without macros, so the file stays safe to share and works in Excel for the web.
Can I mark attendance on my phone?
Yes, in the Excel mobile app on iPhone and Android. Tap a cell and type the code; the summary recalculates when the file syncs.
How do I add a new person mid-term?
Add the row to the Roster sheet, then copy the name link and summary formulas down one more row on the other sheets.
Can I track partial days or hours instead of P/A?
Yes. Use numeric codes (1 for full day, 0.5 for half day) and swap COUNTIF for SUM in the summary.
Will the file work in Google Sheets?
Mostly. COUNTIF and data validation carry over, but some conditional formatting rules and table behaviour may need re-creating.