# Thread: multiple if statements in one formula

1. I would like to get a formula where there are multiple "if" statement where statement 1 would test a cell and if true then copy cell e1, if false then go to the next "if" statement. If the next "if" statement were true then copy cell f1, if false then go to the next "if" statement. and so on.

Thank you

2. [quote name='MNN' post='771539' date='21-Apr-2009 14:20']I would like to get a formula where there are multiple "if" statement where statement 1 would test a cell and if true then copy cell e1, if false then go to the next "if" statement. If the next "if" statement were true then copy cell f1, if false then go to the next "if" statement. and so on.

Thank you[/quote]
You can use the syntax =IF(condition1,E1,IF(Condition2,F1,IF(Condition3,G 1,H1)))
but I think there is a limit of 8 nested IF statements.

3. I should have asked in the first request - how do you test for the value if letters and not numbers. The letters could be any letter(s)

Is it possible?

4. [quote name='MNN' post='771554' date='21-Apr-2009 16:27']I should have asked in the first request - how do you test for the value if letters and not numbers. The letters could be any letter(s)[/quote]
Can you be a bit more specific about the EXACT test you want to do. In my example I included the text condition1, which could have been A1="AA" and condition 2 which could have been A1="BB" for example.

5. Sure the locations and condition titles are:

cell B5 entitled ALLOCATION A
cell C5 entitled ALLOCATION B
cell D5 entitled DEPT

These represent the conditions I am testing for. But i wonder if there is a general condition testing for any combination of letters instead of specific words or phrases. For instance, if the condition were numbers I would test for any number > 0.5 (as an example).

6. Stuart's formula =IF(Condition1,E1,IF(Condition2,F1,IF(Condition3,G 1,H1))) is a very general recipe. You can use all kinds of conditions. For example:

=IF(B5>0.5,E1,IF(...,...

You'll really have to make an effort to explain more clearly what you want to accomplish, otherwise we can't help you.

7. Let me try an example to make my point. I included a worksheet to hopefull clear up my poor directions.

8. I'm sorry, I don't have the slightest idea what your worksheet means.

9. [quote name='MNN' post='771572' date='21-Apr-2009 17:19']Sure the locations and condition titles are:

cell B5 entitled ALLOCATION A
cell C5 entitled ALLOCATION B
cell D5 entitled DEPT

These represent the conditions I am testing for. But i wonder if there is a general condition testing for any combination of letters instead of specific words or phrases. For instance, if the condition were numbers I would test for any number > 0.5 (as an example).[/quote]
If you want to test for a cell containing ANY text that isn't a number then you could use
=If(ISTEXT(A1),"AA","BB")
This will display AA if A1 contains any text string that isn't a number, otherwise it will display BB