ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   If more than condition forumula (https://www.excelbanter.com/excel-worksheet-functions/94882-if-more-than-condition-forumula.html)

Corey

If more than condition forumula
 
I am trying to set up an IF calculation as below:
=IF(L6="ABC",100,IF(L6="DEF",200,IF(L6="GHI",50)))
The baove is fine but i now need a 2nd condition as below.

I want to add a second condition to it say like:
=IF(P6="" and L6="ABC",100,IF(P6="" and L6="DEF",200,IF(P6="" and
L6="GHI",50, IF(P6="Yes" and L6="ABC",150, IF(P6="Yes" and L6=DEF",250,
IF(P6="Yes" and L6="GHI",75))))))

I try this but get an error.

What syntax do i use other than (and) to include a 2nd condition ??


Corey....



Biff

If more than condition forumula
 
Hi!

Here's one way:

=IF(AND(P6="",L6<""),VLOOKUP(L6,{"ABC",100;"DEF", 200;"GHI",50},2,0),IF(AND(P6="Yes",L6<""),VLOOKUP (L6,{"ABC",150;"DEF",250;"GHI",75},2,0),""))

Biff

"Corey" wrote in message
...
I am trying to set up an IF calculation as below:
=IF(L6="ABC",100,IF(L6="DEF",200,IF(L6="GHI",50)))
The baove is fine but i now need a 2nd condition as below.

I want to add a second condition to it say like:
=IF(P6="" and L6="ABC",100,IF(P6="" and L6="DEF",200,IF(P6="" and
L6="GHI",50, IF(P6="Yes" and L6="ABC",150, IF(P6="Yes" and L6=DEF",250,
IF(P6="Yes" and L6="GHI",75))))))

I try this but get an error.

What syntax do i use other than (and) to include a 2nd condition ??


Corey....




Corey

If more than condition forumula
 
You are a champ.
Perfect.

Thnx
Corey....

"Biff" wrote in message
...
Hi!

Here's one way:

=IF(AND(P6="",L6<""),VLOOKUP(L6,{"ABC",100;"DEF", 200;"GHI",50},2,0),IF(AND(P6="Yes",L6<""),VLOOKUP (L6,{"ABC",150;"DEF",250;"GHI",75},2,0),""))

Biff

"Corey" wrote in message
...
I am trying to set up an IF calculation as below:
=IF(L6="ABC",100,IF(L6="DEF",200,IF(L6="GHI",50)))
The baove is fine but i now need a 2nd condition as below.

I want to add a second condition to it say like:
=IF(P6="" and L6="ABC",100,IF(P6="" and L6="DEF",200,IF(P6="" and
L6="GHI",50, IF(P6="Yes" and L6="ABC",150, IF(P6="Yes" and L6=DEF",250,
IF(P6="Yes" and L6="GHI",75))))))

I try this but get an error.

What syntax do i use other than (and) to include a 2nd condition ??


Corey....






Biff

If more than condition forumula
 
You're welcome!

Biff

"Corey" wrote in message
...
You are a champ.
Perfect.

Thnx
Corey....

"Biff" wrote in message
...
Hi!

Here's one way:

=IF(AND(P6="",L6<""),VLOOKUP(L6,{"ABC",100;"DEF", 200;"GHI",50},2,0),IF(AND(P6="Yes",L6<""),VLOOKUP (L6,{"ABC",150;"DEF",250;"GHI",75},2,0),""))

Biff

"Corey" wrote in message
...
I am trying to set up an IF calculation as below:
=IF(L6="ABC",100,IF(L6="DEF",200,IF(L6="GHI",50)))
The baove is fine but i now need a 2nd condition as below.

I want to add a second condition to it say like:
=IF(P6="" and L6="ABC",100,IF(P6="" and L6="DEF",200,IF(P6="" and
L6="GHI",50, IF(P6="Yes" and L6="ABC",150, IF(P6="Yes" and L6=DEF",250,
IF(P6="Yes" and L6="GHI",75))))))

I try this but get an error.

What syntax do i use other than (and) to include a 2nd condition ??


Corey....









All times are GMT +1. The time now is 09:34 PM.

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