If Statements - Multiple formulae

M

Ms MIS

I have a worksheet with 5 columns (A-E)
I want to create a formula in column E to do the following;

If column A = SJN and column C = SJN
Then output B+D
Else If column A = SJN and column C <> SJN
Then output B
Else If column A<>SJN and column C = SJN
Then output D

Can anyone help me?
Thanks.
 
S

SteveG

Try this.


=IF(AND(A1="SJN",C1="SJN"),SUM(B1,D1),IF(AND(A1="SJN",C1<>"SJN"),B1,IF(AND(A1<>"SJN",C1="SJN"),D1,"")))


Cheers,
Stev
 
B

Bruno Campanini

Ms MIS said:
I have a worksheet with 5 columns (A-E)
I want to create a formula in column E to do the following;

If column A = SJN and column C = SJN
Then output B+D
Else If column A = SJN and column C <> SJN
Then output B
Else If column A<>SJN and column C = SJN
Then output D

=IF(AND(A1="SJN",C1="SJN"),B1+D1,
IF(AND(A1="SJN",C1<>"SJN"),B1,
IF(AND(A1<>"SJN",C1="SJN"),D1,)))

Ciao
Brunio
 
S

Stefi

It's not clear what is SJN, so I supposed it's a string. Type in E1 and fill
down as needed:

=IF(AND(A1="sjn",C4="sjn"),B1&D1,IF(AND(A1="sjn",C1<>"sjn"),B1,IF(AND(A1<>"sjn",C1="sjn"),D1,"not thought of")))

Regards,
Stefi

„Ms MIS†ezt írta:
 
R

Ron Coderre

Try this:
For values in Row 2:
E2: =(A2="SJN")*B2+(C2="SJN")*D2

Does that help?

***********
Regards,
Ron
 
Top