Test equations with empty cells

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
 
C

Cameron

-----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
 
D

Dan E

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top