Test equations with empty cells

  • Thread starter Thread starter geoff
  • Start date Start date
G

geoff

I'm trying to write an equation in one column of cells
that tests if an adjacent cell has no value. If so, then
the if statement should calculate a value. If the
adjacent cell does have a number, then the if statement
should leave the cell blank or assign it a value of zero.

ex: G5 should check to see if there is a value in F5. If
F5 has a value, then G5 should equal zero (or remain
blank). If F5 has no value, then G5 should calculate a
value.

Any suggestions on how to accomplish this? I couldn't
find a way to describe the "blank cell" state in an if
statement.

Thanks!
Geoff
 
-----Original Message-----
I'm trying to write an equation in one column of cells
that tests if an adjacent cell has no value. If so, then
the if statement should calculate a value. If the
adjacent cell does have a number, then the if statement
should leave the cell blank or assign it a value of zero.

ex: G5 should check to see if there is a value in F5. If
F5 has a value, then G5 should equal zero (or remain
blank). If F5 has no value, then G5 should calculate a
value.

Any suggestions on how to accomplish this? I couldn't
find a way to describe the "blank cell" state in an if
statement.

Thanks!
Geoff
.
Try this:

if(isnumber(f5),0,<calculation>)
where you enter whatever values you need to calculate
 
Geoff,

=IF(ISBLANK(F5),"F5 is blank","F5 has a value")

Change "F5 is blank" and "F5 has a value" for whatever you like.

Dan E
 
Back
Top