# 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))

Range1___________________Range2

Item____Price____________Item______Price
Shoes___\$80______________Jeans_____\$70
Skirt___\$30______________T-Shirt___\$10
Socks___\$5_______________Sneakers__\$100

Item to look____Jeans
Price___________\$70
Screenshot // Retrieving a Price Value By Looking at Two Difference Data Tables
Retrieving a Price Value By Looking at Two Difference Data Tables

Terms and Conditions of use

The applications/code on this site are distributed as is and without warranties or liability. In no event shall the owner of the copyrights, or the authors of the applications/code be liable for any loss of profit, any problems or any damage resulting from the use or evaluation of the applications/code.