Match a Name and Date in Excel with IF, AND, and VLOOKUP
Question details
The user needs to match a name and date on Sheet2 and return the corresponding value from the sixth column.

- Product
- Microsoft Excel
- Device & OS
- not provided
- Scenario
- A formula uses the name in B2 and date in AK2 to look up a value in Sheet2 columns A through F.
- Observed behavior
- The original formula has misplaced parentheses and separates the AND conditions incorrectly.
Check that Sheet2 column A contains names, column B contains dates, and column F contains the values to return. Make sure AK2 and the dates on Sheet2 are stored as dates with matching time values.
Use INDEX and MATCH to check both criteria on the same row
Use this method when a name can appear more than once with different dates.
Select the result cell and enter =IFERROR(INDEX(Sheet2!F2:F1000,MATCH(1,(Sheet2!A2:A1000=B2)*(Sheet2!B2:B1000=AK2),0)),"").
Press Enter in a current version of Excel. In older Excel versions, press Ctrl+Shift+Enter to confirm it as an array formula.
Compare the returned value with column F on Sheet2. Adjust all three ranges to cover your data while keeping their start and end rows aligned.

Correct the IF, AND, and VLOOKUP formula
Use this version when each name appears only once in Sheet2 column A.
Look up a Name and Date in WPS Spreadsheets
Use INDEX and MATCH in WPS Spreadsheets to find a row matching both criteria and return its value from column F.
- 1. Open the workbook: Open WPS Spreadsheets and use Open to select your Excel workbook.
- 2. Check the source columns: Select Sheet2 and confirm that names are in column A, dates are in column B, and return values are in column F.
- 3. Enter the formula: On the sheet containing B2 and AK2, select a result cell and enter =IFERROR(INDEX(Sheet2!F2:F1000,MATCH(1,(Sheet2!A2:A1000=B2)*(Sheet2!B2:B1000=AK2),0)),"").
- 4. Confirm and review: Press Enter and check the result against Sheet2. If your WPS version requires array-formula entry, use Ctrl+Shift+Enter instead.

Frequently Asked Questions
Why does VLOOKUP return a blank when the name and date exist?
VLOOKUP checks the first row with the name in Sheet2 column A. If its date does not match AK2, the formula returns a blank even when a later row matches. Use the INDEX and MATCH formula to check both criteria on each row.
How do I return a different column from Sheet2?
In the INDEX and MATCH formula, replace Sheet2!F2:F1000 with the desired return-column range, keeping the same starting and ending rows as the criteria ranges.
Why do matching-looking dates fail the lookup?
A date may be stored as text or include a time value. Check AK2 and Sheet2 column B, and make sure the underlying date and time values match, not just their displayed formatting.
What happens if more than one row matches both criteria?
The INDEX and MATCH formula returns the column F value from the first matching row in the specified range.




