ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Nested "If formula" - returns zero when reference cell is empty (https://www.excelbanter.com/excel-programming/384357-nested-if-formula-returns-zero-when-reference-cell-empty.html)

[email protected]

Nested "If formula" - returns zero when reference cell is empty
 
In cell A I can have one of three things... a blank cell, a cell value
of zero or a cell value greater than zero. Depending on which value
is in cell A1 I want the value in cell B1 to be the following:

A1 is greater than zero - B1 should =A1 plus 1

A1 is equal to zero - B1 should = 0

A1 is empty = B1 should be empty

Shown below is the nested "if formula' I wrote. The problem is when
A1 is empty a zero is displayed in B1. In this senario I want cell B1
to be blank. I know I can suppress zero values from displaying but
that affects the whole woksheet and I don't want that.


=IF(A10,A1+1,IF(A1=0,"0",IF(A1="","")))


okrob

Nested "If formula" - returns zero when reference cell is empty
 
On Mar 2, 8:49 am, wrote:
In cell A I can have one of three things... a blank cell, a cell value
of zero or a cell value greater than zero. Depending on which value
is in cell A1 I want the value in cell B1 to be the following:

A1 is greater than zero - B1 should =A1 plus 1

A1 is equal to zero - B1 should = 0

A1 is empty = B1 should be empty

Shown below is the nested "if formula' I wrote. The problem is when
A1 is empty a zero is displayed in B1. In this senario I want cell B1
to be blank. I know I can suppress zero values from displaying but
that affects the whole woksheet and I don't want that.

=IF(A10,A1+1,IF(A1=0,"0",IF(A1="","")))


=IF(A10,A1+1,IF(A1="","",0))


Bob Phillips

Nested "If formula" - returns zero when reference cell is empty
 
=IF(A10,A1+1,IF(A1="","",IF(A1=0,A1,"")))

--
---
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)



wrote in message
ups.com...
In cell A I can have one of three things... a blank cell, a cell value
of zero or a cell value greater than zero. Depending on which value
is in cell A1 I want the value in cell B1 to be the following:

A1 is greater than zero - B1 should =A1 plus 1

A1 is equal to zero - B1 should = 0

A1 is empty = B1 should be empty

Shown below is the nested "if formula' I wrote. The problem is when
A1 is empty a zero is displayed in B1. In this senario I want cell B1
to be blank. I know I can suppress zero values from displaying but
that affects the whole woksheet and I don't want that.


=IF(A10,A1+1,IF(A1=0,"0",IF(A1="","")))





All times are GMT +1. The time now is 03:33 PM.

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