Multiple conditional branching in excel

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi All

I'm new to excel and I'm not a pro with vb either but was wondering how to do conditional branching for instance if I would like to have 5 diffrent possibilities in a if statement instead of 2 is there a better way than growing the if statement more complicating?In Vb its the case statement what is it in excel?

Any help would be appreciated a bunch!

NeoSwoosh
 
Hi NeoSwoosh,


One way would be to nest your IF functions, that is use each subsequent IF
as the arument for the preceding IF function.

Another way might be to use a Case statement inside a UDF.


---
Regards,
Norman



NeoSwoosh said:
Hi All

I'm new to excel and I'm not a pro with vb either but was wondering how to
do conditional branching for instance if I would like to have 5 diffrent
possibilities in a if statement instead of 2 is there a better way than
growing the if statement more complicating?In Vb its the case statement what
is it in excel?
 
How about using the following If Structure:

IF Test.Code THEN
Code
ELSEIF Test.Code THEN
Code
ELSEIF Test.Code THEN
Code
ELSE
Code
ENDIF
 

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

Back
Top