When I use the formula below and either H7 or I7 is blank I get a blank answer J7. When I remove the IFERROR I get a value error. Any ideas
=IFERROR(IF($H7=$I7,"",SUM($H7-$I7)),"")
When I use the formula below and either H7 or I7 is blank I get a blank answer J7. When I remove the IFERROR I get a value error. Any ideas
=IFERROR(IF($H7=$I7,"",SUM($H7-$I7)),"")
If either H7 or I7 is blank, what result do you want? Where does J7 come into play--is that the cell with the formula?
No need to use SUM here, by the way.
Jeff
| | |·| |·| |·| |·| | |:| | |·| |·|
Read the rules
Use code tags to [code]enclose your code![/code]
J7 is where the formula is below. I just want it to subtract the two cells and if it equals zero I want it to be blank (“”)
Try this:
=IF($H7-$I7=0,"",$H7-$I7)
Ali
Enthusiastic self-taught user of MS Excel who's always learning!
Don't forget to say "thank you" in your thread to anyone who has offered you help.
You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.
Forum Rules (updated August 2023): please read them here.
Or use a customized format with #,#,"" to hide zero values.
Honestly, I think this is a bad idea. I have only this week seen one forum member getting extremely confused because they had done something similar and then forgotten. At least if it's built into the formula, it's easy to find out why zeroes are not showing.
Hi AliGW
I honestly do not think that way because formatting is more efficient. I understand that for a small group of cells the formula is used, but for a large range of cells with sparse values it will not be usable, in my opinion.
Then we shall have to agree to disagree.
It's perfectly usable on large data - why wouldn't it be? Maybe you mean something other than 'usable'?
When you say "blank", exactly how is H7 or I7 "blank"? Is it an invisible zero? Is it truly an empty cell with nothing typed in it? Is it a formula that results in "" as a result? Or is it a " "? (<- Note that there is a space between the quotes.)either H7 or I7 is blank
Just to let you know, I got the same situation as you when " " (note the space) was in one cell or the other. Make sure your "blank" cell is not actually invisible text.
I'm with Ali on this one...
Glenn
None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.
Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks