Use INDEX and MATCH in Excel to Find Animal Weights by Date
Question details
Find the weight for an animal on a specified date and identify the animal associated with a date.

- Product
- Microsoft Excel
- Device & OS
- not provided
- Scenario
- A table contains animal names, dates, and weights, and the user needs to retrieve the matching record.
- Observed behavior
- The desired result is the weight for the specified animal and date, or the animal name associated with a date.
Arrange the source table with animal names in D2:D9, dates in E2:E9, and weights in F2:F9. Make sure the lookup date and source dates are stored as actual dates, not text.
Find a Weight Using Both Animal and Date
Use this formula when you know the animal and date and want the corresponding weight.
Enter the date in A3 and the animal name, such as cat or dog, in B3.
In C3, enter =INDEX($F$2:$F$9,MATCH(1,($D$2:$D$9=B3)*($E$2:$E$9=A3),0)). Adjust the ranges if your table is in different cells.
Press Enter in Microsoft 365 or Excel 2021 and later. In older Excel versions, press Ctrl+Shift+Enter to confirm the array formula, then drag the fill handle down to apply it to more rows.

Identify the Animal Associated With a Date
Use a date-only lookup when you need to find which animal appears on a particular date.
Look Up Animal Weights in WPS Spreadsheets
Use INDEX and MATCH in WPS Spreadsheets to retrieve a weight that matches both an animal and a date.
- 1. Open your spreadsheet: Open WPS Spreadsheets and use Open to select your workbook.
- 2. Set up the criteria: With animals in D2:D9, dates in E2:E9, and weights in F2:F9, enter a lookup date in A3 and an animal name in B3.
- 3. Enter the lookup formula: In C3, enter =INDEX($F$2:$F$9,MATCH(1,($D$2:$D$9=B3)*($E$2:$E$9=A3),0)) and confirm the formula. If your version requires array entry, use Ctrl+Shift+Enter.
- 4. Apply it to other rows: Drag the fill handle from C3 down to calculate weights for additional dates and animals.

Frequently Asked Questions
Why does the formula return #N/A?
There may be no row matching both the animal and date. Check the name in B3 and make sure A3 and the dates in E2:E9 are stored as dates rather than text.
Can I look up only cat weights?
Yes. Replace B3 in the multiple-criteria formula with "cat": =INDEX($F$2:$F$9,MATCH(1,($D$2:$D$9="cat")*($E$2:$E$9=A3),0)).
What happens if a date appears for both a cat and a dog?
A date-only MATCH returns the first matching row. Include the animal name as a second criterion to retrieve the weight for the animal you want.
Why are there dollar signs in the table ranges?
The dollar signs keep ranges such as $F$2:$F$9 fixed when you drag the formula down. The lookup references A3 and B3 change to the next row.




