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.
 
It was not finding the value, so it would always say NO. I found the issue -- it's because the servername column seems to need to be the first one in the sheet (column A). When I moved it there, it started working. Thanks for the reply!
 
Upvote 0

Excel Facts

Which Excel functions can ignore hidden rows?
The SUBTOTAL and AGGREGATE functions ignore hidden rows. AGGREGATE can also exclude error cells and more.
It was not finding the value, so it would always say NO. I found the issue -- it's because the servername column seems to need to be the first one in the sheet (column A). When I moved it there, it started working. Thanks for the reply!

Great. There is no need to switch columns for Index/Match would solve the issue.
 
Upvote 0
Wonderful -- I am not familiar with this feature. Could you please explain how I would do this? Thank you!
 
Upvote 0
Wonderful -- I am not familiar with this feature. Could you please explain how I would do this? Thank you!

If you just need yes/no as outcome, MATCH is enough. Suppose we want to check for A214 against SUBSET!A2:A120, we would just need:

=IF(ISNUMBER(MATCH($A214,SUBSET!$A$2:$A$120,0)),"YES","NO")
 
Upvote 0
If you just need yes/no as outcome, MATCH is enough. Suppose we want to check for A214 against SUBSET!A2:A120, we would just need:

=IF(ISNUMBER(MATCH($A214,SUBSET!$A$2:$A$120,0)),"YES","NO")

And if you were okay with TRUE/FALSE rather than YES/NO, you could simplify even further: =ISNUMBER(MATCH($A214,SUBSET!$A$2:$A$120,0))
 
Upvote 0
Perfect -- THANK YOU both! That worked perfectly. I would guess that this takes less processing than using the VLOOKUP command I had been using, so all the better!
 
Upvote 0

Forum statistics

Threads
1,223,262
Messages
6,171,080
Members
452,377
Latest member
bradfordsam

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