Tracking attendance efficiently is vital for managing team or class participation. In Excel, the COUNTIF
function can help you count attendance based on predefined criteria. Below is an example demonstrating how to use this function, along with an exercise for you to practice.
Example
Here’s an example of how the COUNTIF
function works. You can see the embedded Excel sheet below to interact with the data.
Name | Status |
---|---|
John | Present |
Jane | Absent |
Jim | Present |
Jill | Absent |
Jack | Present |
Exercise
Using the table below, count the number of:
- Students who are "Present" using
COUNTIF
. - Students who are "Absent" using
COUNTIF
.
Solution
To count the number of students based on their attendance status:
- Using COUNTIF for "Present":
- Formula:
=COUNTIF(B2:B6, "Present")
- Result:
3
(John, Jim, Jack)
- Formula:
- Using COUNTIF for "Absent":
- Formula:
=COUNTIF(B2:B6, "Absent")
- Result:
2
(Jane, Jill)
- Formula: