Writing IF statement help (1 Viewer)

vidus

Confused User
Local time
Yesterday, 16:25
Joined
Jun 21, 2009
Messages
117
Is this kind of IF statement possible in excel? I need it to do the following:

If A1 = "No" then do this formula, but If A1 = "Yes" then do this formula.

I am unsure how to proceed with this, it is my first if statement in excel!
 

stopher

AWF VIP
Local time
Today, 00:25
Joined
Feb 1, 2006
Messages
2,395
I assume the reason you ask is because there could be other values besides Yes and No?

Anyway, here's an example (nested IF) ...

IF(A1="No", B1*C1, IF(A1="Yes",D1*E1,"0") )

You can see that the red bit is a new IF statement dealing with the condition when A1="No" is false. If A1 is neither Yes nor No then the result in my exmaple is 0 but you can please yourself what result to have.

If you know that the values are only Yes and No then you could simply do:

IF (A1="Yes", B1*C1, D1*E1)

Which literally means if A1 is Yes them B1*C1, else D1*E1


hth

CHris
 

vidus

Confused User
Local time
Yesterday, 16:25
Joined
Jun 21, 2009
Messages
117
I assume the reason you ask is because there could be other values besides Yes and No?

Anyway, here's an example (nested IF) ...

IF(A1="No", B1*C1, IF(A1="Yes",D1*E1,"0") )

You can see that the red bit is a new IF statement dealing with the condition when A1="No" is false. If A1 is neither Yes nor No then the result in my exmaple is 0 but you can please yourself what result to have.

If you know that the values are only Yes and No then you could simply do:

IF (A1="Yes", B1*C1, D1*E1)

Which literally means if A1 is Yes them B1*C1, else D1*E1


hth

CHris

Perfect, thanks for this! Exactly what I was looking for. :)
 

Users who are viewing this thread

Top Bottom