Show blank if "x" or "X", else run a VLOOKUP

rsbidinger

New Member
Joined
May 29, 2019
Messages
8
Hello, I'm trying to put in a formula to output the cell blank if marked 'x' or 'X', else run a VLOOKUP.

How do I do this? Essentially, I'm trying to combine the following...

Here's my IF statement:
=IF(OR(H12<>"X",H12<>"x"),result,"")

Here's my VLOOKUP:
=VLOOKUP($C11,'Blue'!$C11:$O$500,7,FALSE)

Thank you for your help.

Ryan
 
Try:

=IF(H12="x","",IF(VLOOKUP($C11,'Blue'!$C11:$O$500,7,FALSE)=0,"",
VLOOKUP($C11,'Blue'!$C11:$O$500,7,FALSE)))

OR

=IF(OR(H12="x",VLOOKUP($C11,Blue!$C11:$O$500,7,FALSE)=0),"",VLOOKUP($C11,Blue!$C11:$O$500,7,FALSE))
 
Last edited:
Upvote 0

Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.
Okay one more question...

It's showing zero because the VLOOKUP sees a blank cell. If it's a blank cell, is there a way to tell it to show blank instead of zero? Thanks.

Nest it within another IF statement will suffice:

=IF(IF(H12="x","",VLOOKUP($C11,'Blue'!$C11:$O$500,7,FALSE))=0,"",VLOOKUP($C11,'Blue'!$C11:$O$500,7,FALSE))
 
Upvote 0
Perfect!!!!

Thank you for saving me hours of research & trial & error.

Try:

=IF(H12="x","",IF(VLOOKUP($C11,'Blue'!$C11:$O$500,7,FALSE)=0,"",
VLOOKUP($C11,'Blue'!$C11:$O$500,7,FALSE)))

OR

=IF(OR(H12="x",VLOOKUP($C11,Blue!$C11:$O$500,7,FALSE)=0),"",VLOOKUP($C11,Blue!$C11:$O$500,7,FALSE))
 
Upvote 0

Forum statistics

Threads
1,216,057
Messages
6,128,520
Members
449,456
Latest member
SammMcCandless

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