Summary

One way to track attendance is with simple formulas based on the COUNTIF function. In the example shown, the formula in M5 is:

=COUNTIF(C5:L5,"x")

Generic formula

=COUNTIF(range,"x")

Explanation

This formula simply uses COUNTIF with a criteria of "x" (not quotation marks) to count x's in each row, where "x" represents "present" and an empty cell represents "absent":

=COUNTIF(C5:L5,"x") // count present

The count absent days, the worksheet uses COUNTIF again, configured to count empty cells:

=COUNTIF(C5:L5,"") // count absent

Video: How to use the COUNTIF function (3 min, free). It's one of 117 lessons in our Core Formula course.

Support Exceljet

Many websites (including Exceljet) have lost over half their traffic in the past year because of the crushing impact of AI on web searches. Exceljet is still at it, publishing free content each week. If you find Exceljet helpful, you can support the site and go ad-free with the Exceljet Lifetime Pass. One payment, no subscription, and ads are gone forever. Plus, you get our Excel Shortcuts video course as a thank you.

Get the Lifetime Pass

Dave Bruns Profile Picture

AuthorMicrosoft Most Valuable Professional Award

Dave Bruns

Hi - I'm Dave Bruns, and I run Exceljet with my wife, Lisa. Our goal is to help you work faster in Excel. We create short videos, and clear examples of formulas, functions, pivot tables, conditional formatting, and charts.