Nesting conditional statements

G

GARY

I need to test the contents of cell a1 for three values:

If a1 = 1 then 5, else 6
If a1 = 2 then 9, else 4
if a1 = 4 then 10, else 3

How do I nest the conditional statements?
 
G

gcotterl

Is these better:

If a1 = 1 then 5, else 6
If a1 = 2 then 9, else 4
if a1 = 4 then 10, else 3
if a1 is not 1 or 2 or 4 then 7
 
D

David Biddulph

No. You are still contradicting yourself. Please look again at what you
have written and think about what you have said.

In what condition does the 6 apply?
In what condition does the 4 apply?
In what condition does the 3 apply?
And hence in what condition does the 7 apply?
 
G

gcotterl

Hi David,

I can write one formula that tests one condition.
I can write several separate formulas each testing one condition.
But, apparently, I can't correctly "nest" several separate into one
statement.

Can you help me? (Ignore my examples and use decent examples).

Gary
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top