If/And Formula

H

Hamed parhizkar

If I have 4 cells,

A1=10
B1=0
C1=10
D1=15

I know the first part of the formula of what I am trying to do.

=if(sum(c1:d1)<>0,"A","")

But how do I also say in the same formula that if B1<>0 and
if(sum(c1:d1)<>0,"A","")

So if B1=0 then I dont want the "A" to pop up.
 
A

akphidelt

This really isn't a programming question but to do what you ask you can try

If(And(B1<>0,sum(c1:d1)<>0),"A","")
 
D

dan dungan

I put the following formula in cell A4.

=IF(AND(B1<>0,SUM(C1:D1)<>0),"A","")

Is that what you wanted?
 
S

sbitaxi

If I have 4 cells,

A1=10
B1=0
C1=10
D1=15

I know the first part of the formula of what I am trying to do.

=if(sum(c1:d1)<>0,"A","")

But how do I also say in the same formula that if B1<>0 and
if(sum(c1:d1)<>0,"A","")

So if B1=0 then I dont want the "A" to pop up.

=IF(B1<>0,IF(SUM(C1:D1)<>0,"A",""),"")

That will check B1 first, if the result is True, then it moves on to
the next IF statement, if it is false, then the result is "".


Steven
 

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