# Lookup Prices Matching Code From 2 Tables

L

#### Legacy 436357

##### Guest
Hi,

Can someone derive formulas for I3:I8?

Thanks

Excel Workbook
BCDEFGHI
1Table 1Table 2Table 3
2CodePriceCodePriceCodePrice
3X1\$ 2.00Y1\$ 1.00X1
4X2\$ 4.00Y2\$ 3.00X2
5X3\$ 6.00Y3\$ 5.00X3
6Y1
7Y2
8Y3
Sheet1

#### Gerald Higgins

##### Well-known Member
Hmm . . .

I can think of at least two possible solutions

1) Merge table 1 and table 2 into a single table.

2) In I3, something like this
Code:
``=IFERROR(VLOOKUP(H3,B\$3:C\$5,2,FALSE),IFERROR(VLOOKUP(H3,E\$3:F\$5,2,FALSE),"No match found"))``

L

#### Legacy 436357

##### Guest
Thank you Gerald Higgins that works great!

L

#### Legacy 436357

##### Guest

Excel Workbook
BCDEFGHIJKL
1Table 1Table 2Table 3
2CodeColumn2PriceCodeColumn2Column1PriceCodePrice
3X1\$ 2.00Y1\$ 1.00X10
4X2\$ 4.00Y2\$ 3.00X20
5X3\$ 6.00Y3\$ 5.00X30
6Y10
7Y20
8Y30
Sheet1

#### Gerald Higgins

##### Well-known Member
Here's the adjusted version for Table 1, maybe you can figure out yourself how to adjust if for Table 2 . . .

In L3 . . .
Rich (BB code):
``=IFERROR(VLOOKUP(K3,B\$3:D\$5,3,FALSE),IFERROR(VLOOKUP(K3,F\$3:I\$5,2,FALSE),"No match found"))``

L

#### Legacy 436357

##### Guest
Teach a man to fish thanks. I understand now what the number represents.

Thanks so much for your help!