If Statements - Multiple formulae

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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.
 
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
 
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
 
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:
 
Try this:
For values in Row 2:
E2: =(A2="SJN")*B2+(C2="SJN")*D2

Does that help?

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

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

Back
Top