How to use COUNTIF in Google Sheets for attendance - Digital Growth Tutor tutorial

How to Use COUNTIF in Google Sheets for Attendance

Quick answer: To count attendance in Google Sheets, mark each entry as P or A, then use COUNTIF. Type =COUNTIF(B:B, "P") to count Present entries in column B and =COUNTIF(B:B, "A") to count Absent entries. For example, a list of P, A, P, A, P returns 3 for Present and 2 for Absent. COUNTIF ignores case, so p and P both count.

This is for teachers, trainers and managers who track attendance in Google Sheets. COUNTIF updates automatically as you add marks, so you never have to count by hand.

Prefer to watch? The 2-minute video above shows every step on screen.

What do you need before using COUNTIF?

  • An attendance sheet with one mark per cell, such as P for Present and A for Absent.
  • Consistent marks. Use the same letters everywhere so the formula can match them.

How to count attendance with COUNTIF (step by step)

Step 1: Set up your sheet

Put names in column A and attendance marks in the next column or columns. For a single day, use column B. For a month, use one column per day.

Step 2: Count Present entries

Click an empty cell and type =COUNTIF(B:B, "P"), then press Enter. The result is the number of P marks in column B.

Step 3: Count Absent entries

In another cell, type =COUNTIF(B:B, "A"). You can count any mark the same way, such as “L” for Late.

Step 4: Count per student across days

If each row is a student and each column is a day, count across the row instead. For row 2 with days in columns B to AF, use =COUNTIF(B2:AF2, "P") and drag the formula down for every student.

Step 5: Work out an attendance percentage

Divide Present days by days marked: =COUNTIF(B2:AF2, "P")/COUNTA(B2:AF2). Then click Format → Number → Percent to show it as a percentage.

Tips for a cleaner attendance sheet

  • Use a dropdown with P and A so nobody types a different mark.
  • Use a specific range like B2:B40 instead of the whole column if the column has other data below.
  • Lock the header row with View, Freeze so names and dates stay visible.

COUNTIF not counting correctly? Common problems and fixes

The count is lower than expected

Some cells may contain extra spaces, like “P “. Use a dropdown to keep entries clean, or count with a wildcard: =COUNTIF(B:B, "P*").

You get a formula parse error

Check the quotes around the mark and the comma between arguments. In some locales, Google Sheets uses a semicolon instead: =COUNTIF(B:B; "P").

The percentage shows as a decimal

Select the cell and choose Format → Number → Percent.

What should you do next?

  1. Make a dropdown list in Google Sheets for P and A marks.
  2. Count checkboxes in Google Sheets if you prefer tick boxes.
  3. Freeze rows or columns to keep names in view.

Frequently asked questions

Is COUNTIF case sensitive in Google Sheets?

No. COUNTIF treats P and p as the same, so both are counted.

How do I count two different marks together?

Add two COUNTIF formulas, for example COUNTIF(B:B, “P”) plus COUNTIF(B:B, “L”) to count Present and Late together.

What is the difference between COUNTIF and COUNTIFS?

COUNTIF uses one condition. COUNTIFS checks several conditions at once, such as Present marks for a specific class or month.

Can COUNTIF count checkboxes for attendance?

Yes. Ticked checkboxes are TRUE, so COUNTIF(B2:B40, TRUE) counts the ticked boxes.

Want more step-by-step tutorials? Subscribe to Digital Growth Tutor on YouTube for short, no-jargon guides.

Leave a Comment

Your email address will not be published. Required fields are marked *