+ Reply to Thread
Results 1 to 7 of 7

Choose function

  1. #1
    Registered User
    Join Date
    11-20-2009
    Location
    canada
    MS-Off Ver
    Excel 2003
    Posts
    3

    Exclamation Choose function

    Hi,
    I have to use the "choose" function in excel. However, my problem is that for one value, many lines correspond to it. For example:

    1 MExico
    2 Canada
    3 à 45 USA
    46 à 59 France
    70 et + Belgium

    So, if for say on my excel sheet I wrote 34, USA will appear. My problem is that I want to know if there's a short way (maybe use the function "If" inside the choose function) to write my choose function.

    Thank you very much

  2. #2
    Forum Expert Paul's Avatar
    Join Date
    02-05-2007
    Location
    Wisconsin
    MS-Off Ver
    2016/365
    Posts
    6,887

    Re: Choose function

    Hi Bluenight, and welcome to the forum.

    Can't say I understand your question. Can you try to explain a little differently what your data currently is, and what result you're expecting?

    Thanks!

  3. #3
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    16,043

    Re: Choose function

    Something like this?

    Book1.xls

    Change number in H1
    Never use Merged Cells in Excel

  4. #4
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Choose function

    It's not clear whether your numbers and nations are in different columns or one column, zbor's file above assumes the latter.

    For the sake of simplicity I would suggest however that if you can you should enter the min value of each range in 1 column and nation in column to right, eg:

    Please Login or Register  to view this content.
    Assuming above is in A:B then you can use a basic VLOOKUP to retrieve the nation appropriate to your value of choice, eg

    Please Login or Register  to view this content.
    (note use of 60 n/a to cater for fact there is no value specified for 60-69)

  5. #5
    Registered User
    Join Date
    11-20-2009
    Location
    canada
    MS-Off Ver
    Excel 2003
    Posts
    3

    Exclamation Re: Choose function

    Ok, i'll try to better explain my problem in a different way. Let's take this example

    Rank 1 ... A+
    Rank 2 ... A
    Rank 3 to 6 ... A-
    Rank 7 to 10 ... B+
    Rank 11 to 42 ... B
    Rank 42 and + ... B-

    So, the ranks correspond to the score that a student get. So rank 1 correspond to the student that had the best score and so on... Therefore, using the choose function I have to write, depending of the rank, the result that the student will get. So if I write 34, the result "B" should appear. The problem is that i don't know how can i write something in my choose function so that the rank 11 to 42 corresponds to 31 values each giving a "B".

    I hope it is clearer!
    thank you

  6. #6
    Registered User
    Join Date
    11-20-2009
    Location
    canada
    MS-Off Ver
    Excel 2003
    Posts
    3

    Exclamation Re: Choose function

    I forgot... there are 2 columns... one column is rank... and the other one is result

  7. #7
    Forum Expert Paul's Avatar
    Join Date
    02-05-2007
    Location
    Wisconsin
    MS-Off Ver
    2016/365
    Posts
    6,887

    Re: Choose function

    You don't need CHOOSE, you can use LOOKUP.

    =LOOKUP(what_to_lookup , array_of_values_to_search , array_of_values_to_return)

    =LOOKUP(34,{1,2,3,7,11,42},{"A+","A","A-","B+","B","B-"})

    The first array contains the lower-limit of each range in ascending order, and the result array contains the appropriate response for that value. The 34 can be a value, or a reference to a cell containing a value.

    In this case, 34 would return "B".

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1