vlookup to return Yes and No values

Junior9

Board Regular
Joined
Feb 12, 2008
Messages
65
Is it possible to write a vlookup that will return a value of Yes if the value is true and a value of No if the value is false?

I have data in column A on sheet 1 so the lookup value starts in cell A2 and the table array is on sheet 2 in columns A and B so the column index is 2.
 

Excel Facts

Return population for a City
If you have a list of cities in A2:A100, use Data, Geography. Then =A2.Population and copy down.
Is it possible to write a vlookup that will return a value of Yes if the value is true and a value of No if the value is false?

I have data in column A on sheet 1 so the lookup value starts in cell A2 and the table array is on sheet 2 in columns A and B so the column index is 2.

If "the value is true" means a successful match...

=IF(ISNUMBER(MATCH(LookupValue,MatchRange,0)),"Yes","No")

MatchRange is the range against which LookupValue is matched (more often than not, the first column of your table).
 
Upvote 0
Here is generic sample:
=IF(ISERROR(VLOOKUP("YourLookupValue",A1:B26,1,FALSE)),"NO","YES")
Apply your own values for lookupvalue, range, and column number. Excel Help can assist in getting the syntax right.
 
Upvote 0
Wohoo..it works like magic.

=IF(ISERROR(VLOOKUP(AJ2,'Valid rates'!F:F,1,0)),"Valid","Invalid")

I wanted to know if my rates are valid or invalid from my rate database. And it was done.

Thanks team a ton!!!
 
Upvote 0
Wohoo..it works like magic.

=IF(ISERROR(VLOOKUP(AJ2,'Valid rates'!F:F,1,0)),"Valid","Invalid")

I wanted to know if my rates are valid or invalid from my rate database. And it was done.

Thanks team a ton!!!

=IF(ISNUMBER(MATCH(AJ2,'Valid rates'!F:F,0)),"Valid","Invalid")

would also work.
 
Upvote 0
This thread has been very useful for me to refresh my memory on VLOOKUP usage... But unfortunately I am still unable to do what I need to do, which is pretty much what the OP asked for. Can anyone help a guy who is rusty with Excel and trying to get back to doing more useful stuff with it?

I have a spreadsheet w/ multiple worksheets (tabs). One tab ("FULL") has a list of all the servers in a particular region. The other tab ("SUBSET") has a subset of the list. On the FULL tab I have added a column where I want YES/No to indicate whether or not the particular server name exists in the SUBSET sheet.

Here is what I have now, but it's not working. Any idea what I might be doing wrong?

=IF(ISERROR(VLOOKUP($A214,EMEA_Branches!$A$2:$R$120,2,FALSE)),"NO","YES")
 
Upvote 0
This thread has been very useful for me to refresh my memory on VLOOKUP usage... But unfortunately I am still unable to do what I need to do, which is pretty much what the OP asked for. Can anyone help a guy who is rusty with Excel and trying to get back to doing more useful stuff with it?

I have a spreadsheet w/ multiple worksheets (tabs). One tab ("FULL") has a list of all the servers in a particular region. The other tab ("SUBSET") has a subset of the list. On the FULL tab I have added a column where I want YES/No to indicate whether or not the particular server name exists in the SUBSET sheet.

Here is what I have now, but it's not working. Any idea what I might be doing wrong?

=IF(ISERROR(VLOOKUP($A214,EMEA_Branches!$A$2:$R$120,2,FALSE)),"NO","YES")
Looks like I can't edit my previous post... But I noticed an error. This is the actual formula that I am trying to use:

=IF(ISERROR(VLOOKUP($A214,SUBSET!$A$2:$R$120,2,FALSE)),"NO","YES")
...Where A214 is a cell in the FULL worksheet

Thank you!
 
Upvote 0
Looks like I can't edit my previous post... But I noticed an error. This is the actual formula that I am trying to use:

=IF(ISERROR(VLOOKUP($A214,SUBSET!$A$2:$R$120,2,FALSE)),"NO","YES")
...Where A214 is a cell in the FULL worksheet

Thank you!

What is the problem you encounter?
 
Upvote 0

Forum statistics

Threads
1,215,396
Messages
6,124,685
Members
449,179
Latest member
kfhw720

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