Formula with blanks

C

Canon

Excel 2007
Looking for a formula that will do the follwing;
If cell A12 equals 0 then cell C12 should be blank, if cell A12 equals 1
then cell C12 should equal the sum of cell H5
 
S

Sheeloo

=IF(A12=0,"",IF(A12=1,H12,"neither one or zero"))

You can replace "neither one or zero" with whatever you want in this
situation...
 
C

Canon

Thanks Sheeloo, but what do I replace that with?

Sheeloo said:
=IF(A12=0,"",IF(A12=1,H12,"neither one or zero"))

You can replace "neither one or zero" with whatever you want in this
situation...
 
D

David Biddulph

You can replace "neither one or zero" with whatever result you want from the
formula when A12 is neither one nor zero.
You will doubtless have realised that the H12 in the formula should have
been H5.
 
S

Sheeloo

Thanks David for pointing that out...

David Biddulph said:
You can replace "neither one or zero" with whatever result you want from the
formula when A12 is neither one nor zero.
You will doubtless have realised that the H12 in the formula should have
been H5.
 
C

Canon

Sorry guys, i'm not picking this up. I need cell C12 to pull the number from
cell H5 when cell A12 is 1, and cell C12 to be blank when cell A12 is 0
 
S

Sheeloo

Canon,

Use this in C12

=IF(A12=1,H5,IF(A12=0,""))

If A12 is 1 it will give you the value in H5, blank if A12 is 0, FALSE if it
is neither 1 or 0
 
D

David Biddulph

Yes, you'd already said that.

You said what you wanted if A12 is 0.
You said what you wanted if A12 is 1.
You *didn't* say what you wanted if A12 is neither 0 or 1.
 

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