Count Attendance Across Multiple Excel Sheets with COUNTIF
Question details
Count attendance entries across different ranges on multiple worksheets and calculate an attendance percentage.

- Product
- Microsoft Excel
- Device & OS
- not provided
- Scenario
- Attendance is recorded with the marker "p" in ranges on separate worksheets.
- Observed behavior
- The user needs a combined count of present entries and a percentage based on the expected number of attendance entries.
Check the worksheet names, attendance ranges, and marker used for present entries. Confirm how many entries are expected and check that the column reference is $O2, not $02.
Add separate COUNTIF results for each worksheet
Use this method when attendance entries are stored in different ranges on separate sheets.
Select a result cell and enter =COUNTIF('Sheet1'!$E2:$O2,"p")+COUNTIF('Sheet2'!$E2:$F5,"p"). Replace the sheet names and ranges with those in your workbook.
In another cell, divide the combined count by the number of expected entries. For example, if every cell in the two sample ranges represents an expected entry, use =(COUNTIF('Sheet1'!$E2:$O2,"p")+COUNTIF('Sheet2'!$E2:$F5,"p"))/19.
Select the percentage result cell and choose Home > Percent Style.

Calculate attendance across sheets in WPS Spreadsheets
Use separate COUNTIF formulas in WPS Spreadsheets to count present entries across worksheet ranges and calculate an attendance percentage.
- 1. Open the workbook: Open WPS Spreadsheets and select Open to choose your attendance workbook.
- 2. Add the counts: Select a result cell and enter =COUNTIF('Sheet1'!$E2:$O2,"p")+COUNTIF('Sheet2'!$E2:$F5,"p"), adjusting the sheet names and ranges as needed.
- 3. Calculate attendance: In another cell, divide the combined count by the number of expected entries, such as 19 if every cell in the sample ranges is expected.
- 4. Format the percentage: Select the result cell and use the percentage format on the Home tab.

Frequently Asked Questions
Can one COUNTIFS formula combine unrelated ranges from different sheets?
Not for this combined count. Enter a separate COUNTIF for each worksheet range and add the results with a plus sign.
How do I include another worksheet in the count?
Add another term to the formula, such as +COUNTIF('Sheet3'!$E2:$O2,"p"), using the actual sheet name and range.
What should I use as the attendance percentage denominator?
Use the total number of expected attendance entries. The sample ranges have 19 cells, but use 19 only if each cell represents an expected entry.
Is $02 a valid reference to column O?
No. Use $O2 with the letter O to refer to column O, row 2. The dollar sign fixes the column if you copy the formula.




