Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Max Max is offline
external usenet poster
 
Posts: 390
Default How can 0 be used in the Choose function

Hello,
We download data from a software package that uses numbers 0,1,2,3,4 to
indicate a catagory.
0 - Salary
1- Medical Aid
2 - Benefits
3 - Car Allowance
4 - Mobile Allowance

This information is downloaded into Excel into a table.
Want to convert the the 0, 1, 2, etc into the relevant string (Salary or
Medical Aid etc), the function Choose does not allow 0 to be as an index.
Is there a alternative formula, or is there a way to get the Choose function
to read the 0?

Thank you and best regards

Max
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 10,593
Default How can 0 be used in the Choose function

=CHOOSE(A2+1,"Salary","Medical Aid","Benefits","Car Allowance","Mobile
Allowance")

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

"Max" wrote in message
...
Hello,
We download data from a software package that uses numbers 0,1,2,3,4 to
indicate a catagory.
0 - Salary
1- Medical Aid
2 - Benefits
3 - Car Allowance
4 - Mobile Allowance

This information is downloaded into Excel into a table.
Want to convert the the 0, 1, 2, etc into the relevant string (Salary or
Medical Aid etc), the function Choose does not allow 0 to be as an index.
Is there a alternative formula, or is there a way to get the Choose
function
to read the 0?

Thank you and best regards

Max



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Max Max is offline
external usenet poster
 
Posts: 390
Default How can 0 be used in the Choose function

Well done and thank you Bob.
It was so simple.

"Bob Phillips" wrote:

=CHOOSE(A2+1,"Salary","Medical Aid","Benefits","Car Allowance","Mobile
Allowance")

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

"Max" wrote in message
...
Hello,
We download data from a software package that uses numbers 0,1,2,3,4 to
indicate a catagory.
0 - Salary
1- Medical Aid
2 - Benefits
3 - Car Allowance
4 - Mobile Allowance

This information is downloaded into Excel into a table.
Want to convert the the 0, 1, 2, etc into the relevant string (Salary or
Medical Aid etc), the function Choose does not allow 0 to be as an index.
Is there a alternative formula, or is there a way to get the Choose
function
to read the 0?

Thank you and best regards

Max




  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,344
Default How can 0 be used in the Choose function

Hi,

Here are some other alternatives:
If you set up a table in Excel which looks like:

0 Salary
1 Medical Aid
2 Benefits
3 Car Allowance
4 Mobile Allowance

say in the range G1:H5 then you could use any of these formulas among many
others:

=VLOOKUP(A1,G1:H5,2)
=VLOOKUP(A1,{0,"Salary";1,"Medical Aid";2,"Benefits";3,"Car
Allowance";4,"Mobile Allowance"},2)
=LOOKUP(A1,G1:G5,H1:H5)
=LOOKUP(A1,G1:G5,{"Salary";"Medical Aid";"Benefits";"Car Allowance";"Mobile
Allowance"})
or shortest of all
=LOOKUP(A1,G1:H5)
--
Cheers,
Shane Devenshire


"Max" wrote:

Hello,
We download data from a software package that uses numbers 0,1,2,3,4 to
indicate a catagory.
0 - Salary
1- Medical Aid
2 - Benefits
3 - Car Allowance
4 - Mobile Allowance

This information is downloaded into Excel into a table.
Want to convert the the 0, 1, 2, etc into the relevant string (Salary or
Medical Aid etc), the function Choose does not allow 0 to be as an index.
Is there a alternative formula, or is there a way to get the Choose function
to read the 0?

Thank you and best regards

Max

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
which function to choose? J-EL Excel Worksheet Functions 0 November 9th 06 07:54 PM
Which function to choose? J-EL Excel Worksheet Functions 2 November 9th 06 06:46 PM
Choose Function UD 9 Excel Discussion (Misc queries) 1 November 25th 05 09:22 PM
CHOOSE function Mcniwram Excel Discussion (Misc queries) 1 April 21st 05 08:07 AM
CHOOSE Function Paul Excel Worksheet Functions 4 November 2nd 04 06:16 PM


All times are GMT +1. The time now is 10:37 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"