ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Multiple Conditions (https://www.excelbanter.com/excel-discussion-misc-queries/227483-multiple-conditions.html)

KS

Multiple Conditions
 
Hi all -
Hoping someone can help he

Columns A and B contain either a Y or N value; C contains a dollar amount
I want to write the Value of C into either of 2 new columns, say D and E

In all cases if A = N then D and E = "N/A"
If A = Y and B = N, then D = dollar amount from C
If A = Y and B = Y, then E = dollar amount from C

Thanks for any assistance!




Eduardo

Multiple Conditions
 
Hi,
assuming information starts in row 1 try


In column D enter
=if(A1="N","N/A",if(and(A="Y",B="N"),C1,"")

In column E enter

=if(A1="N","N/A",if(and(A="Y",B="N"),"",C1)

"KS" wrote:

Hi all -
Hoping someone can help he

Columns A and B contain either a Y or N value; C contains a dollar amount
I want to write the Value of C into either of 2 new columns, say D and E

In all cases if A = N then D and E = "N/A"
If A = Y and B = N, then D = dollar amount from C
If A = Y and B = Y, then E = dollar amount from C

Thanks for any assistance!




KS

Multiple Conditions
 
Hi
Thank you for your help -

Unfortunately, that did not work - returns #NAME?


"KS" wrote:

Hi all -
Hoping someone can help he

Columns A and B contain either a Y or N value; C contains a dollar amount
I want to write the Value of C into either of 2 new columns, say D and E

In all cases if A = N then D and E = "N/A"
If A = Y and B = N, then D = dollar amount from C
If A = Y and B = Y, then E = dollar amount from C

Thanks for any assistance!




KS

Multiple Conditions
 
Wait!
Yes - it did work - row reference missing and added back in, I didn't notice
at first:

=IF(A1="N","N/A",IF(AND(A1="Y",B1="N"),C1,""))

Many Thanks

"Eduardo" wrote:

Hi,
assuming information starts in row 1 try


In column D enter
=if(A1="N","N/A",if(and(A="Y",B="N"),C1,"")

In column E enter

=if(A1="N","N/A",if(and(A="Y",B="N"),"",C1)

"KS" wrote:

Hi all -
Hoping someone can help he

Columns A and B contain either a Y or N value; C contains a dollar amount
I want to write the Value of C into either of 2 new columns, say D and E

In all cases if A = N then D and E = "N/A"
If A = Y and B = N, then D = dollar amount from C
If A = Y and B = Y, then E = dollar amount from C

Thanks for any assistance!




Eduardo

Multiple Conditions
 
Hi,
It didn't work in both columns??
check you don't have any space in front of the N or the Y

if this was helpful please say yes

"KS" wrote:

Hi
Thank you for your help -

Unfortunately, that did not work - returns #NAME?


"KS" wrote:

Hi all -
Hoping someone can help he

Columns A and B contain either a Y or N value; C contains a dollar amount
I want to write the Value of C into either of 2 new columns, say D and E

In all cases if A = N then D and E = "N/A"
If A = Y and B = N, then D = dollar amount from C
If A = Y and B = Y, then E = dollar amount from C

Thanks for any assistance!




KS

Multiple Conditions
 
Helpful = YES!!! Very. Many thanks

"Eduardo" wrote:

Hi,
It didn't work in both columns??
check you don't have any space in front of the N or the Y

if this was helpful please say yes

"KS" wrote:

Hi
Thank you for your help -

Unfortunately, that did not work - returns #NAME?


"KS" wrote:

Hi all -
Hoping someone can help he

Columns A and B contain either a Y or N value; C contains a dollar amount
I want to write the Value of C into either of 2 new columns, say D and E

In all cases if A = N then D and E = "N/A"
If A = Y and B = N, then D = dollar amount from C
If A = Y and B = Y, then E = dollar amount from C

Thanks for any assistance!




KS

Multiple Conditions
 
I have another:

Column N contains numeric values (page counts)
I need to add the sum of N under 2 conditions:

1) Total of N for all records where A= Y and B= Y
2) Total of N for all records where A= Y and B= N

These 2 totals will reside in two diff cells - doesn't matter where, say M1
and M2 respectively.





"Eduardo" wrote:

Hi,
It didn't work in both columns??
check you don't have any space in front of the N or the Y

if this was helpful please say yes

"KS" wrote:

Hi
Thank you for your help -

Unfortunately, that did not work - returns #NAME?


"KS" wrote:

Hi all -
Hoping someone can help he

Columns A and B contain either a Y or N value; C contains a dollar amount
I want to write the Value of C into either of 2 new columns, say D and E

In all cases if A = N then D and E = "N/A"
If A = Y and B = N, then D = dollar amount from C
If A = Y and B = Y, then E = dollar amount from C

Thanks for any assistance!




Eduardo

Multiple Conditions
 
Hi
In M1 enter
=SUMPRODUCT(--(A:A="Y"),--(B:B="N"),N:N)

in M2 enter

=SUMPRODUCT(--(A:A="Y"),--(B:B="y"),N:N)

is this was helpful please click on yes in the left corner of the post.
thank you

"KS" wrote:

I have another:

Column N contains numeric values (page counts)
I need to add the sum of N under 2 conditions:

1) Total of N for all records where A= Y and B= Y
2) Total of N for all records where A= Y and B= N

These 2 totals will reside in two diff cells - doesn't matter where, say M1
and M2 respectively.





"Eduardo" wrote:

Hi,
It didn't work in both columns??
check you don't have any space in front of the N or the Y

if this was helpful please say yes

"KS" wrote:

Hi
Thank you for your help -

Unfortunately, that did not work - returns #NAME?


"KS" wrote:

Hi all -
Hoping someone can help he

Columns A and B contain either a Y or N value; C contains a dollar amount
I want to write the Value of C into either of 2 new columns, say D and E

In all cases if A = N then D and E = "N/A"
If A = Y and B = N, then D = dollar amount from C
If A = Y and B = Y, then E = dollar amount from C

Thanks for any assistance!





All times are GMT +1. The time now is 02:00 AM.

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