#N/A

JJ in SD

Active Member
Joined
Jul 30, 2002
Messages
316
Good Morning,

How do I loose the #N/A from this =VLOOKUP(A4,$A$13:$H176,7,TRUE) if the lookup cells are empty?

Thanks in advance,

JJ in SD
 

Excel Facts

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.
One way (though not the most efficient), is to use the ISNA function:

=ISNA(VLOOKUP(A4,$A$13:$H176,7,TRUE),"",VLOOKUP(A4,$A$13:$H176,7,TRUE))
 
Upvote 0
A slight edit to Jimiskey's post

=IF(ISNA(VLOOKUP(A4,$A$13:$H176,7,TRUE),"",VLOOKUP(A4,$A$13:$H176,7,TRUE)))
 
Upvote 0
Of course, you could also insert a new 1st record to your lookup_table with 0 in column A and ="" in column 7.

PS: Also, make sure that your lookup_table is sorted in ascending order based on the values in column A.
 
Upvote 0
Thanks for the pick-up Lenze! My mind is in Monday mode...
 
Upvote 0
JJ in SD said:
Good Morning,

How do I loose the #N/A from this =VLOOKUP(A4,$A$13:$H176,7,TRUE) if the lookup cells are empty?

Thanks in advance,

JJ in SD

If you have the morefunc add-in, you can have...

=IF(A4<>"",IF(ISNA(SETV(VLOOKUP(A4,$A$13:$H176,7))),"",GETV()),"")
 
Upvote 0
JJ in SD, you won't need the morefunc add-in since your range_lookup value is TRUE. A #N/A can only occur if your lookup_value is less than the 1st value in column A.

=IF(ISBLANK(A4),"",VLOOKUP(A4,$A$13:$H176,7,TRUE))

...will suffice. However, you could get by with just...

=VLOOKUP(A4,$A$13:$H176,7,TRUE)

...if you're willing to insert a new 1st record (with a 0 in column A) in your table array (as I mentioned earlier).
 
Upvote 0
Aladin Akyurek said:
JJ in SD said:
Good Morning,

How do I loose the #N/A from this =VLOOKUP(A4,$A$13:$H176,7,TRUE) if the lookup cells are empty?

Thanks in advance,

JJ in SD

If you have the morefunc add-in, you can have...

=IF(A4<>"",IF(ISNA(SETV(VLOOKUP(A4,$A$13:$H176,7))),"",GETV()),"")

Forget this contrib if A13:A176 is numeric and sorted in ascending order (as it has been noted). In case you need to switch to an exact match, the formula would hold.
 
Upvote 0

Forum statistics

Threads
1,221,692
Messages
6,161,336
Members
451,697
Latest member
pedroDH

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