Vlookup <> returning #N/A on less than array values but greater than array values?

davidryoung

Board Regular
Joined
Feb 7, 2005
Messages
110
I am using this formula on sheet 1:
=IF(B8="","",IF(VLOOKUP(B8,D8S1179,2)<>B8,K33,IF(VLOOKUP(B8,D8S1179,2)>K33,VLOOKUP(B8,D8S1179,2),K33)))

with this array defined as D8S1179 on sheet 2
8 0.01627 0.00482 0.00559
9 0.01356 0.00482 0.00698
10 0.10398 0.02733 0.0824
11 0.08499 0.03859 0.03771
12 0.14557 0.13183 0.13687
13 0.33363 0.20579 0.32402
14 0.18535 0.32154 0.26117
15 0.09042 0.18006 0.1243
16 0.02351 0.07074 0.01816
17 0.00271 0.00965 0.00279
18 0 0.00322 0
19 0 0.00161 0

when i enter values into B8 on sheet 1 greater than or equal to the first column it pulls the correct values, but when I enter values that are less than the first column it returns #N/A. Can someone explain why?
 

Excel Facts

Using Function Arguments with nested formulas
If writing INDEX in Func. Arguments, type MATCH(. Use the mouse to click inside MATCH in the formula bar. Dialog switches to MATCH.
never mind figured it out:
=IF(B8="","",IF(ISNA(VLOOKUP(B8,D8S1179,2,FALSE)),K33,IF(VLOOKUP(B8,D8S1179,2)>K33,VLOOKUP(B8,D8S1179,2),K33)))
 
Upvote 0
B8 is a variable value that "should" be in column 1 of the array D8S1179, but there could be values outside the array range that get entered into B8. This is a small part of a statistics generator that is pulling in frequencies depending on the values entered into a table (this table includes B8).
K33 is a set minimum frequency that gets pulled in when the value returned from the array is less than K33.
 
Upvote 0
B8 is a variable value that "should" be in column 1 of the array D8S1179, but there could be values outside the array range that get entered into B8. This is a small part of a statistics generator that is pulling in frequencies depending on the values entered into a table (this table includes B8).
K33 is a set minimum frequency that gets pulled in when the value returned from the array is less than K33.

Try...
Code:
=IF(B8="","",
   IF(B8 < INDEX(D8S1179,1,1),K33,
    IF(VLOOKUP(B8,D8S1179,2,1)>K33,VLOOKUP(B8,D8S1179,2,1),K33)))
 
Upvote 0

Forum statistics

Threads
1,213,514
Messages
6,114,078
Members
448,547
Latest member
arndtea

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