Return a Blank if Error OR 0

The_T

New Member
Joined
Sep 30, 2018
Messages
31
Hi guys,

Wondering if anybody a help with the following:

I am currently using the following formula to return blanks when an error results from 'E25' being blank:

=IFERROR(VLOOKUP(E25,'WORKSHEET'!$A$1:$S$1000,19,FALSE,"")

However, when E25 is not blank but row '19' in '$A$1:$S$1000' has no results, the formula returns a '0'.

In the case of there being no result to return, I'd like there also to be a blank (and for there to only not be a blank when there is a result to return - 'YES or 'NO' being the only 2 returnable options in this case).

I have tried OR and AND formulae but with no success.

I'm tired so maybe I have missed something.

Any help would be much appreciated.
 

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.
How about
=IF(VLOOKUP(E25,WORKSHEET!$A$1:$S$1000,19,FALSE)=0,"",IFERROR(VLOOKUP(E25,WORKSHEET!$A$1:$S$1000,19,FALSE),""))
 
Upvote 0
Hi Fluff. That would error before the iferror ever had its chance. Maybe wrap the if rather than the vlookup.

=IFERROR(IF(VLOOKUP(E25,WORKSHEET!$A$1:$S$1000,19,FALSE)=0,"",VLOOKUP(E25,WORKSHEET!$A$1:$S$1000,19,FALSE)),"")
 
Upvote 0
Excellent point, I obviously wasn't thinking clearly :banghead:
 
Upvote 0
I forget to think all the time :)

You could also do this if the lookup is producing text results:

=IFERROR(""&VLOOKUP(E25,WORKSHEET!$A$1:$S$1000,19,FALSE),"")
 
Upvote 0
Hi guys, thanks a lot for the replies.

Will give both options a go and get back to you!
 
Upvote 0
Don't bother trying my suggestion from post#2, as Steve pointed out it won't always work.
 
Upvote 0
Thanks for your help guys.

Steve the Fish - Your solution works perfectly. You are clearly either a genius or some sort of divine entity.

Cheers!
 
Upvote 0

Forum statistics

Threads
1,223,886
Messages
6,175,195
Members
452,616
Latest member
intern444

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