Function Problems

Count Matching Names in the Same Row Across Excel Sheets

Khadija KhanKhadija Khan Dec 2, 2026 868 views

Question details

Count how often two assigned names appear in the same row across daily worksheets.

Count Matching Names in the Same Row Across Excel Sheets
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.
Before you start

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.

Solution 1Recommended

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.

1
Enter the daily count

On the Monday worksheet, select D1 and enter =COUNTIFS(A2:A100,"Alice",B2:B100,"Bob"). This counts only rows where both conditions are met.

2
Repeat on each daily sheet

Enter the same formula in D1 on every other daily worksheet, adjusting the ranges if needed. Keep each daily result in D1.

3
Arrange the daily tabs

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.

4
Calculate the weekly total

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 each day and sum the results across sheets
Check the assignment order: The example counts Alice in column A with Bob in column B; it does not count the reverse arrangement. The 3D sum also includes any extra sheets placed between Monday and Friday.
Count weekly assignments

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. 1. Open the schedule: Open WPS Spreadsheets and use Open to select your weekly Excel workbook.
  2. 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. 3. Add the other daily counts: Enter the corresponding COUNTIFS formula in D1 on each remaining daily sheet.
  4. 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.
Count two assignments that appear in the same rowCombine daily worksheet counts into one weekly totalOpen and edit Microsoft Excel XLSX and XLS filesWork with a familiar spreadsheet interface
microsoft office alternative - wps office

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.