@CHOOSE Equivalent Function

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

Guest

Is there an equivalent @ function in Excel that works like the @CHOOSE Quattro Pro function? I have tried LOOKUP and VLOOKUP and they do not seem to fit my needs because they cannot handle a blank.

I am converting a numerical value in a cell to a word using the following:

To change Facing Direction to Faces, where Facing Direction is col L
@CHOOSE($L2," ","N","S","E","W","B")

To change Side to Side, where Side is col K
@CHOOSE($K2," ","Right","Left","Ovhd","Median","Island")

Where the numeric contents of cell K2 are either: blank, 1, 2, 3, 4 or 5. A 5 in K2 returns Island. A blank in K2 returns a blank.

Thanks!
Tom
 
Is there an equivalent @ function in Excel that works like the @CHOOSE
Quattro Pro function? . . .
...

Yes. It's called CHOOSE in Excel. However, unlike QP, Excel's CHOOSE is 1-based
rather than 0-based, so CHOOSE(X99,"-","a","b","c") returns an error when X99 is
blank, "-" when X99 is 1, "a" when X99 is 2, etc. So unless you change the
values stored in the cell used as the first argumane to CHOOSE, you're going to
have to replace @CHOOSE(X99,"","a","b","c") with CHOOSE(X99+1,"","a","b","c").
 
Thanks Harlan! This certainly makes sense now that I know that Excel's CHOOSE is 1 based. I just could not figure it out and help and hints gave no clue.

Appreciate the resolution to my problem. Many Thanks!
Tom
 
Back
Top