Multiple VLOOKUP stump

Sean15

Well-known Member
Joined
Jun 25, 2005
Messages
719
Office Version
  1. 2010
Platform
  1. Windows
Hi:

Could you tell me why this formula is returning ""

=IF('LReports'!J3="UG",VLOOKUP(H3,'AVERAGE Price'!$B$5:$D$39,3,0),IF(J3="DF",VLOOKUP('LReports'!H3,'AVERAGE Price'!$B$5:$D$39,2,0),""))

VLOOKUP range looks something like this:

column B column C column D
MMYY DF UG
917 1.8954 1.7754
1017 1.8804 1.6722
1117 1.9728 1.7295

values in J are "DF", "UG" and No code

values in H: 917, 1017, 1117...


Thanks for your help.

Sean
 
Last edited:

Excel Facts

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.
@Aladin Akyurek - one last question.

In VLOOKUP(J3,{"DF",2;"UG",3},2,0)

What is the purpose of the second 2?

{"DF",2;"UG",3} is a hard-coded 2-column table. Its first column consists of DF and UG, its second column 2 and 3. The second 2 in the formula refers to that column like the 2 in VLOOKUP(J3,TABLE,2,0) also does.
 
Upvote 0

Forum statistics

Threads
1,223,162
Messages
6,170,431
Members
452,326
Latest member
johnshaji

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top