ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   If Statements - Multiple formulae (https://www.excelbanter.com/excel-worksheet-functions/59472-if-statements-multiple-formulae.html)

Ms MIS

If Statements - Multiple formulae
 
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.

SteveG

If Statements - Multiple formulae
 

Try this.


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


Cheers,
Steve


--
SteveG
------------------------------------------------------------------------
SteveG's Profile: http://www.excelforum.com/member.php...fo&userid=7571
View this thread: http://www.excelforum.com/showthread...hreadid=491840


Bruno Campanini

If Statements - Multiple formulae
 
"Ms MIS" wrote in message
...
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



Stefi

If Statements - Multiple formulae
 
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",C 1<"sjn"),B1,IF(AND(A1<"sjn",C1="sjn"),D1,"not thought of")))

Regards,
Stefi

€˛Ms MIS€¯ ezt Ć*rta:

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.


Ron Coderre

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

Does that help?

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


"Ms MIS" wrote:

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.


Ms MIS

If Statements - Multiple formulae
 
Perfect, much appreciated.

"SteveG" wrote:


Try this.


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


Cheers,
Steve


--
SteveG
------------------------------------------------------------------------
SteveG's Profile: http://www.excelforum.com/member.php...fo&userid=7571
View this thread: http://www.excelforum.com/showthread...hreadid=491840



Kleev

If Statements - Multiple formulae
 
Nothing against the other solutions, but I like this one.

"Ron Coderre" wrote:

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

Does that help?

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


"Ms MIS" wrote:

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.



All times are GMT +1. The time now is 06:26 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com