Forum Discussion
Using IF(ISBLANK getting #Value! error
- May 13, 2021
brendababy02 Try this:
=IF(C4="","",E3-C4)
With =ISBLANK(B4) an empty cell returns TRUE in C4, otherwise FALSE. In your case the formula results in "", which is not empty, when B4 contains nothing (i.e. is blank). Thus, the formula always executes the FALSE argument, E3 - "" (a number minus a text). Hence, #VALUE!
juliejo Would be helpful if you could show all the formulae used. Especially the one that populates D5.
What's in T1 on Worksheet1? What do you get when you only enter =D5*F5 in case D5 empty and in case it is not? Getting no result at all is odd.
Uploading your workbook (leaving out any confidential information) would even be better.
Riny_van_Eekelen Worksheet is attached. It's kind of a messy work in progress.
Basically, I'm building a estimating worksheet for services offered. Some services are offered on a per word (it's a copyediting business) basis, and some are offered for a flat fee. On my form tab, I need the per price and word count to fill in if the service is per word and the total cost to auto-calculate. But if there's a flat fee, I want Per Price and Word Count to remain blank, and I want the flat fee to appear instead of a per-price total. Hope that makes sense.
I started out trying to use ISBLANK formulas (which seems to work in my Per Price column, but maybe that's just an illusion).
Thanks for taking a look!
- SergeiBaklanJun 15, 2021Diamond Contributor
I set "show zero" option back, with that the reason of the issue is more clear
For R1 formula returns zero, not empty string
As a comment, even if it returns empty string, ISBLANK() to test it doesn't work. Cell is blank only if nothing returned to it. Any formula returns some value, zero or empty string or some number in your case.
In next sheet reference returns zero which is hided by your formatting option,
Again, ISBLANK(Worksheet!R1) is always FALSE as far as you have any formula in it. Thus formula in D5 is equivalent of =Worksheet!R1. If in H5 in condition you compare with zero, not with empty string, you have desired result.
- juliejoJun 15, 2021Copper ContributorOh, duh! The whole point of this exercise was to fix the ISBLANK issue, and then I walked right back into it. Thanks for setting me straight!!
- SergeiBaklanJun 16, 2021Diamond Contributor
juliejo , you are welcome.
As a comment, I'd do not recommend hiding zero option in settings. Instead you may apply custom number format only to the cells where you don't like to show zeroes (after the testing) like
General;General;
where instead of first/second General could be desired number or currency format for positive and negative values accordingly.
- Riny_van_EekelenJun 15, 2021Platinum Contributor
juliejo Tried to open your file. Noticed you have ActiveX controls. On a Mac right now, so that doesn't work for me. Perhaps someone else. Sorry!