Return Row and Column Headings for a Matched Cell in Excel
Question details
Find project identifiers in a calendar-style worksheet and return the associated team member, start date, and scheduled day count to a tracker.

- Product
- Microsoft Excel
- Device & OS
- not provided
- Scenario
- A calendar grid contains project IDs, with team members as row headings and dates as column headings.
- Observed behavior
- The tracker should show the matching team member, the first scheduled date, and the number of days for each project ID.
Arrange the Calendar sheet with team members in A2:A10, dates in B1:H1, and project IDs in B2:H10. On a Tracker sheet, enter project IDs in column A; keep calendar dates in chronological order and use one team member per project ID.
Use INDEX and MATCH with dynamic arrays in Excel
Use this method in Microsoft 365 Excel to search the calendar grid for each project ID.
The formulas return the first matching team row and the leftmost matching date. The day count assumes each matching cell represents one scheduled day for the same team member.
On Tracker, enter this formula in B2: =IF($A2="","",IFERROR(INDEX(Calendar!$A$2:$A$10,MATCH(TRUE,BYROW(Calendar!$B$2:$H$10,LAMBDA(r,SUM(--(r=$A2))>0)),0)),"Not found"))
In Tracker C2, enter =IF($A2="","",IFERROR(INDEX(Calendar!$B$1:$H$1,1,MATCH(TRUE,BYCOL(Calendar!$B$2:$H$10,LAMBDA(c,SUM(--(c=$A2))>0)),0)),"Not found")) and format the cell as a date using Home > Number.
In Tracker D2, enter =IF($A2="","",SUMPRODUCT(--(Calendar!$B$2:$H$10=$A2))). This counts matching cells across the calendar grid.
Select Tracker B2:D2 and drag the fill handle down beside the remaining project IDs. Adjust the Calendar ranges in the formulas if your grid is larger.

Build the project tracker in WPS Spreadsheets
Use array formulas in WPS Spreadsheets to find the first matching team row and date column, then count the matching calendar cells.
- 1. Set up the workbook: Open the workbook in WPS Spreadsheets. On Calendar, place team members in A2:A10, chronological dates in B1:H1, and project IDs in B2:H10. Enter IDs on Tracker starting in A2.
- 2. Find the team member: In Tracker B2, enter =IF($A2="","",IFERROR(INDEX(Calendar!$A$2:$A$10,MIN(IF(Calendar!$B$2:$H$10=$A2,ROW(Calendar!$B$2:$H$10)-ROW(Calendar!$B$2)+1))),"Not found")) and confirm it with Ctrl+Shift+Enter.
- 3. Find the start date: In Tracker C2, enter =IF($A2="","",IFERROR(INDEX(Calendar!$B$1:$H$1,1,MIN(IF(Calendar!$B$2:$H$10=$A2,COLUMN(Calendar!$B$2:$H$10)-COLUMN(Calendar!$B$2)+1))),"Not found")) and confirm it with Ctrl+Shift+Enter. Format C2 as a date.
- 4. Count and copy: In Tracker D2, enter =IF($A2="","",SUMPRODUCT(--(Calendar!$B$2:$H$10=$A2))). Select B2:D2 and drag the fill handle down for the other project IDs.

Frequently Asked Questions
Why does the tracker show a number instead of a date?
Excel stores dates as numbers. Select the start-date cells and choose a date format from Home > Number.
What happens when a project ID is not in the calendar?
The team and date formulas display Not found, while the day-count formula returns 0. Check the ID in Tracker column A and the calendar range.
Can the formulas handle a project assigned to multiple people?
They return the first matching team member and count matches across all team rows. For a per-person count, use a separate calculation for each team member.
Why is the returned date not the earliest date?
The formulas return the leftmost matching date. Arrange the Calendar date headings from earliest to latest before using them.
Will the Excel dynamic-array formulas work in an older version?
BYROW and BYCOL require a version that supports those functions. In older versions, array formulas may be needed and must be confirmed with Ctrl+Shift+Enter.




