Use IF and INDEX MATCH Across Two Excel Worksheets
Question details
Look up a value on one of two worksheets based on the selected brand and return a fallback when the matching cell is blank.

- Product
- Microsoft Excel
- Device & OS
- not provided
- Scenario
- A formula selects a worksheet using the brand, then matches a row and column to retrieve a value.
- Observed behavior
- A blank lookup cell can appear as zero, so IFERROR does not necessarily return the fallback value.
Confirm that both worksheets have brand values in column A, variety values in column E, and lookup headers in row 1. Check that E3, C6, and S9 contain the brand, variety, and desired header.
Select the worksheet and check the matched cell for a blank
Use this formula to choose a worksheet by brand, return the matching value, and use a fallback for an empty cell or lookup error.
The formula uses ISBLANK on the matched cell reference so that a genuinely blank cell can be distinguished from a numeric zero. IFERROR handles lookup errors separately.
This example requires an Excel version that supports LET. It treats cells containing formulas that return an empty string as nonblank.
On the worksheet containing E3, C6, S9, and R10:R12, click the cell where you want the lookup result.
Enter this formula in the formula bar and press Enter: =IFERROR(IF(OR(E3="CAN.INTL",E3="BULK"),LET(r,MATCH(1,(E3='ITL_Bulk Varieties'!A2:A652)*(C6='ITL_Bulk Varieties'!E2:E652),0),c,MATCH(S9,'ITL_Bulk Varieties'!A1:CC1,0),IF(ISBLANK(INDEX('ITL_Bulk Varieties'!A2:CC652,r,c)),100-R10-R11-R12,INDEX('ITL_Bulk Varieties'!A2:CC652,r,c))),LET(r,MATCH(1,(E3='DOMESTIC VARIETIES'!A2:A600)*(C6='DOMESTIC VARIETIES'!E2:E600),0),c,MATCH(S9,'DOMESTIC VARIETIES'!A1:CP1,0),IF(ISBLANK(INDEX('DOMESTIC VARIETIES'!A2:CP600,r,c)),100-R10-R11-R12,INDEX('DOMESTIC VARIETIES'!A2:CP600,r,c)))),100-R10-R11-R12)
Edit the sheet names, ranges, and 100-R10-R11-R12 fallback in the formula bar to match your workbook. Test a populated cell, a blank cell, and a cell containing zero on each worksheet.

Build a cross-sheet lookup in WPS Spreadsheets
Open your workbook in WPS Spreadsheets and use the cross-sheet formula to select a table, match a row and header, and check the result for a blank. Check that your WPS version supports LET before using the example.
- 1. Open the workbook: In WPS Spreadsheets, choose Open and select your Excel workbook.
- 2. Check the lookup inputs: Select the worksheet with your lookup inputs and confirm the brand in E3, variety in C6, and header in S9.
- 3. Enter the formula: Click the result cell, paste the formula from the solution into the formula bar, and press Enter. Adjust the sheet names and ranges if needed.
- 4. Test and save: Test blank, zero, and populated source cells, then choose File > Save As to save the workbook in Excel format.

Frequently Asked Questions
Why doesn't IFERROR catch a blank lookup cell?
A blank cell is not an error, and a lookup may return it as zero. Use ISBLANK on the matched cell reference to test for a genuinely empty cell, and use IFERROR for errors such as a failed MATCH.
Will the formula preserve a value of zero?
Yes. ISBLANK checks whether the source cell is empty, so a cell containing the number zero is returned as zero rather than replaced by the fallback.
Which worksheet does the formula search?
The IF test searches ITL_Bulk Varieties when E3 is CAN.INTL or BULK. For other values in E3, it searches DOMESTIC VARIETIES.
What happens if the source cell contains a formula that returns an empty string?
ISBLANK returns FALSE because the cell contains a formula. The example returns that empty string rather than the fallback.
What should I check if the fallback appears unexpectedly?
Check that E3 and C6 match a row, S9 matches a header, and the worksheet names and ranges in the formula are correct. IFERROR also returns the fallback for other formula errors.




