Count Matching Names in the Same Row Across Excel Sheets
Question details
Count how often two assigned names appear in the same row across daily worksheets.

- Product
- Microsoft Excel
- Device & OS
- not provided
- Scenario
- A weekly schedule has a separate worksheet for each day, and the user wants a combined count of rows containing two specified assignments.
- Observed behavior
- The desired result is a weekly total of rows where both specified names appear in their respective assignment columns.
Check which columns contain the two assignments and confirm that the daily sheets use the same layout. Choose an unused cell, such as D1, for the daily count on each sheet.
Count each day and sum the results across sheets
Use COUNTIFS on each daily worksheet, then use a 3D SUM reference to combine the daily counts.
This example counts rows where Alice is in column A and Bob is in column B. Adjust the names, columns, and row limits to match your schedule.
On the Monday worksheet, select D1 and enter =COUNTIFS(A2:A100,"Alice",B2:B100,"Bob"). This counts only rows where both conditions are met.
Enter the same formula in D1 on every other daily worksheet, adjusting the ranges if needed. Keep each daily result in D1.
Place the Monday through Friday worksheet tabs together in tab order. A 3D reference includes every sheet between its first and last sheet, including both endpoints.
On a totals worksheet, select a cell and enter =SUM('Monday:Friday'!D1). Replace Monday and Friday with the names of the first and last daily sheets if yours differ.

Count matching schedule rows in WPS Spreadsheets
Use COUNTIFS to calculate a daily count in WPS Spreadsheets, then add the daily result cells on a totals sheet.
- 1. Open the schedule: Open WPS Spreadsheets and use Open to select your weekly Excel workbook.
- 2. Count matches for each day: On the Monday sheet, select D1 and enter =COUNTIFS(A2:A100,"Alice",B2:B100,"Bob"). Replace the example names and ranges with your assignments.
- 3. Add the other daily counts: Enter the corresponding COUNTIFS formula in D1 on each remaining daily sheet.
- 4. Add the results: On a totals sheet, select a cell and enter =SUM('Monday'!D1,'Tuesday'!D1,'Wednesday'!D1,'Thursday'!D1,'Friday'!D1). Change the sheet names to match your workbook.

Frequently Asked Questions
Does COUNTIFS count names that appear in different rows?
No. In =COUNTIFS(A2:A100,"Alice",B2:B100,"Bob"), both conditions must be met in the same row.
How do I count the names in either column order?
For two distinct names, add the reverse-order count: =COUNTIFS(A2:A100,"Alice",B2:B100,"Bob")+COUNTIFS(A2:A100,"Bob",B2:B100,"Alice").
What if my daily count cells are in different locations?
List the cells individually on the totals sheet, for example =SUM('Monday'!D1,'Tuesday'!E1). A 3D reference uses the same cell location on every included sheet.
Why is my 3D total higher than expected?
Check the worksheet tabs between the first and last sheets in your formula. A reference such as 'Monday:Friday'!D1 includes D1 from every sheet in that tab range.




