General Question

Fallenangel's avatar

Combining IF statements in Excel?

Asked by Fallenangel (255points) October 9th, 2008

I need to Combine about 5 IF statements in Excel, but have no idea how to do it. I can do one If statements with 2 outcomes based on true or false, but I cant go further than that, Can someone help?

(Here’s what I need)
IF (A1 = “A”;A2*B1;(A1=“B”;A2*B2 and so on and so forth.

Observing members: 0 Composing members: 0

6 Answers

MrItty's avatar

The format of an IF() is:

In your case, all you need to do is make your VALUE_IF_FALSE be another IF() statement. So:

=IF(A1=“A”,A2*B1,IF(A1=“B”, A2*B2, IF(A1=“C”, A2*B3, A2*B4)))

The final value is the last “else”. It’s what goes in the cell if none of the conditions are true.

Unfortunately, Excel (at least the 2000 version, don’t know about 2007) has a hard limit to the number of levels you can do this. I think that level is 7, but I’m not 100% sure.

Fallenangel's avatar

Ok, Thank you very much.

critter1982's avatar

it is 7 in 2007 as well.

Fallenangel's avatar

What about in Open Office? I figured it was the same, but that proved false.

srmorgan's avatar

I have worked with Excel and earlier spreadsheets (lotus 1–2-3, visicalc) for over 25 years.
What I have seen with the lastest three or four releases is that there are often built-in functions that can solve your problem more easily than by using nested if statements.
Often the HLOOKUP or VLOOKUP get me to the same place as if statements with much less aggravation.

Not trying to take traffic away from Fluther, but I to go Mr. Excel for advice when I can’t figure out to do something. But in order to take advantage of the experts over there you will have to be able to describe your business problem in sufficient detail.


Fallenangel's avatar

I got, thank you all very much for your help.
Open office prob solved, I just downloaded another trial. My mom is gettin the full in a lil bit so I dont have to worry about the time limit.

Answer this question




to answer.

This question is in the General Section. Responses must be helpful and on-topic.

Your answer will be saved while you login or join.

Have a question? Ask Fluther!

What do you know more about?
Knowledge Networking @ Fluther