vlookup return blank if lookup value is blank, otherwise return yes or no

floggingmolly

Board Regular
Joined
Sep 14, 2019
Messages
167
Office Version
  1. 365
Platform
  1. Windows
I have a vlookup, =IF(ISNA(VLOOKUP(F2,ALL_DATA[CSP ID],1,FALSE)),"NO","YES") which returns Yes or No if there is a match. What I wanted to do is if say F2 is blank, it will return a blank, otherwise return the Yes or No. I'm guessing maybe I need a nested vlookup but everything I try fails. Anybody have any suggestions?
 

Excel Facts

Create a chart in one keystroke
Select the data and press Alt+F1 to insert a default chart. You can change the default chart to any chart type
How about
Excel Formula:
=if(f2="","",IF(ISNA(match(F2,ALL_DATA[CSP ID],0)),"NO","YES"))
 
Upvote 0
You could try:
Excel Formula:
=IF(F2="","",IF(ISNA(VLOOKUP(F2,ALL_DATA[CSP ID],1,FALSE)),"NO","YES"))
Thank you. I think this is exactly what I need. I was trying IF but couldn't get it to work. I only had one IF so I think that's where I went wrong. I appreciate your help.
 
Upvote 0
How about
Excel Formula:
=if(f2="","",IF(ISNA(match(F2,ALL_DATA[CSP ID],0)),"NO","YES"))
Thank you. I think this is exactly what I need. I was trying IF but couldn't get it to work. I only had one IF so I think that's where I went wrong. I appreciate your help.
 
Upvote 0
Glad we could help & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,215,151
Messages
6,123,316
Members
449,094
Latest member
Chestertim

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