Tip Printed from ExcelTip.com
Retrieving a Price Value by Looking at Two Difference Data Tables


Problem:

Listed in range1 (A4:B6) and range2 (D4:E6) are clothing items and their prices.
Cell B9 contains the name of an item from one of the ranges.
We would like to perform a lookup on both ranges, find the relevant item, and return the matching price.

Solution:

Use the ISNA and VLOOKUP functions as shown in the following formula:
=IF(ISNA(VLOOKUP(B9,A4:B6,2,FALSE)),VLOOKUP(B9,D4:E6,2,FALSE),VLOOKUP(B9,A4:B6,2,FALSE))