Confusing Vlookup

JadonR

Board Regular
Joined
Apr 15, 2009
Messages
154
Office Version
  1. 365
I have the following vlookup. However, when it doesn't match any of the values from column D, then I want it to return "EACH". I tried changing FALSE to EACH but that doesn't work.

Code:
[B]=VLOOKUP(A11,’Product Database’!C2:D7,2,FALSE)[/B]
 

Excel Facts

How to create a cell-sized chart?
Tiny charts, called Sparklines, were added to Excel 2010. Look for Sparklines on the Insert tab.
If you have xl2007 or later you can use...
Code:
=IFERROR(VLOOKUP(A11,'Product Database'!C2:D7,2,FALSE),"EACH")

The last parameter of the VLOOKUP function is used to specify:
FALSE means find exact match
TRUE means find an approximate match

...when it doesn't match any of the values from column D...
I'm guessing this was a typo, but just in case....
Note that VLOOKUP looks for matches in the leftmost column of the lookup range.
So in your example formula it will look in Col C for a match and if found, return the value in Col D.
 
Last edited:
Upvote 0
Cool, thanks. You are correct, I did mean column C. Is there any formula that will work for pre-2007 or Open Office?
 
Upvote 0
For pre 2007...

=IF(ISNA(VLOOKUP(A11,’Product Database’!C2:D7,2,FALSE)),"EACH",VLOOKUP(A11,’Product Database’!C2:D7,2,FALSE))


Hope that helps
 
Upvote 0
Thanks JS411, works great!

@Jonmo1, for some reason I get a #NAME! error when I use yours. Any ideas?
 
Upvote 0
Thanks JS411, works great!

@Jonmo1, for some reason I get a #NAME! error when I use yours. Any ideas?

Somehting was wrong with the apostrophe's when I copied your formula into mine...

try

=IF(ISNA(VLOOKUP(A11,'Product Database'!C2:D7,2,FALSE)),"EACH",VLOOKUP(A11,'Product Database'!C2:D7,2,FALSE))
 
Upvote 0

Forum statistics

Threads
1,224,527
Messages
6,179,348
Members
452,907
Latest member
Roland Deschain

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