Alternative to IF function

  • Thread starter Thread starter mms
  • Start date Start date
M

mms

I have a formula that is using nested IFs, and it is beginning to becom
unmanageable.

First I am at the 7-deep limit, but otherwise I find the logic aspec
hard to follow everytime I have to alter it.

In VB there is *Select Case*, in C++ there is *switch*.

Is there a VB *worksheet* function with similar functionality t
these?
(I've searched but can't find).

something like:

Code
 
As far as I know there is not a function to do these. However you ca
do it through a macro. When you create a macro go to help and you wil
find both CASE and SWITCH as a funtion.

Hope this helps!
Michae
 
Something like =CHOOSE(MATCH(A1,{"A-325","A-490","A-500"},0),"Option
1","Option 2","Option3")

It might be best to put {"A-325","A-490","A-500"} values in a table.
Or you could use

=VLOOKUP(A1,B1:C10,2,FAlse)

Where B1=A-325, B2=A-450, etc, C1=Option 1,C2=Option 2, etc.

--

HTH

RP
(remove nothere from the email address if mailing direct)
 
Back
Top