ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   An if statment tat returns a true blank (https://www.excelbanter.com/excel-worksheet-functions/156184-if-statment-tat-returns-true-blank.html)

D

An if statment tat returns a true blank
 
I need an if statment to return a true blank. I currently have
=IF(C129<0,C129*-1,"") as a formula, when fales it returns an empty cell
that returns #value when used in calcuations. I do not want it to return a
zero value, nor can I turn on the option to leave a cell blank for a
calculated zero value, due to other calculations that I need to return zero.

Thanks is advance

Kevin B

An if statment tat returns a true blank
 
You could have your IF return a 0 (zero) and then suppress the display of
zeroes by clicking TOOLS/OPTIONS, selecting the VIEW tab and turn off the
check box labeled ZERO VALUES.

Another option would be to have an IF in your dependent formulas evaluate
cells that are = to "" to a 0 (zero) so that your dependent calculations
don't go wonky on you.
--
Kevin Backmann


"D" wrote:

I need an if statment to return a true blank. I currently have
=IF(C129<0,C129*-1,"") as a formula, when fales it returns an empty cell
that returns #value when used in calcuations. I do not want it to return a
zero value, nor can I turn on the option to leave a cell blank for a
calculated zero value, due to other calculations that I need to return zero.

Thanks is advance


Pete_UK

An if statment tat returns a true blank
 
A formula cannot return a true blank - the cell contains the formula,
after all !

As Kevin says, change your dependent formulae to:

=IF(cell="","",your_calculations)

to avoid the errors.

Hope this helps.

Pete

On Aug 28, 9:46 pm, D wrote:
I need an if statment to return a true blank. I currently have
=IF(C129<0,C129*-1,"") as a formula, when fales it returns an empty cell
that returns #value when used in calcuations. I do not want it to return a
zero value, nor can I turn on the option to leave a cell blank for a
calculated zero value, due to other calculations that I need to return zero.

Thanks is advance




JMB

An if statment tat returns a true blank
 
You could use a custom number format for just that one cell instead of
suppressing 0's for the entire worksheet.

Format/Cells/Custom
#,###;(#,###);

The order for the formatting codes is Positive;Negative;Zero;Text. Then you
don't need IF's in your subsequent formulae.

Also, you could change your formula to
=MAX(0,-A4)



"D" wrote:

I need an if statment to return a true blank. I currently have
=IF(C129<0,C129*-1,"") as a formula, when fales it returns an empty cell
that returns #value when used in calcuations. I do not want it to return a
zero value, nor can I turn on the option to leave a cell blank for a
calculated zero value, due to other calculations that I need to return zero.

Thanks is advance


D

An if statment tat returns a true blank
 
Thank you all for the suggestions, I think that the quickest way to
accomplish what I need is simply to sort the data then delete the zero
values, what I have been doing all along! I need the process to be as simple
as possible since other users will be copying down the formula and
manipulating the data.

"JMB" wrote:

You could use a custom number format for just that one cell instead of
suppressing 0's for the entire worksheet.

Format/Cells/Custom
#,###;(#,###);

The order for the formatting codes is Positive;Negative;Zero;Text. Then you
don't need IF's in your subsequent formulae.

Also, you could change your formula to
=MAX(0,-A4)



"D" wrote:

I need an if statment to return a true blank. I currently have
=IF(C129<0,C129*-1,"") as a formula, when fales it returns an empty cell
that returns #value when used in calcuations. I do not want it to return a
zero value, nor can I turn on the option to leave a cell blank for a
calculated zero value, due to other calculations that I need to return zero.

Thanks is advance



All times are GMT +1. The time now is 04:07 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com