+ Reply to Thread
Results 1 to 11 of 11

CHOOSE Function (Automatic) - Automatic Choose Array

  1. #1
    Valued Forum Contributor
    Join Date
    04-13-2011
    Location
    Ottawa, Canada
    MS-Off Ver
    365
    Posts
    1,080

    CHOOSE Function (Automatic) - Automatic Choose Array

    Hello Excel Experts,

    I have a question for you! Since you all are experts, I believe you guys are familiar with the CHOOSE function.

    =CHOOSE(Index_Num, Value1, [Value2],...)

    Normally, I would use CHOOSE function as the following i.e. =choose($A$1, "US", "Canada", "Europe"), where when the value of $A$1 = 1, it'll be US, 2, be Canada etc.

    What I'm trying to accomplish here is SIMILAR to the following formula WITH THE EXCEPTION of listing all of the country.

    Therefore, ASSUMING if I have all the country's name across row 1, is there a way to make the Value1, [Value2], [Value3] etc to be "automatic" referencing to the rows?

    i.e. =choose($A$1, row($1:$1)), where IF the traditional way of doing would be =choose($A$1, "US", "Canada", "Europe", "Australia", "Japan", "Korea") assuming if there's only 6 countries listed in row 1 in column B, C, D, E, F, G respectively for US, Canada, Europe, Australia, Japan and Korea.

  2. #2
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: CHOOSE Function (Automatic) - Automatic Choose Array

    You can use INDEX for that.

    Formula: copy to clipboard
    Please Login or Register  to view this content.
    If posting code please use code tags, see here.

  3. #3
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,972

    Re: CHOOSE Function (Automatic) - Automatic Choose Array

    have you tried using index/match, instead of choose?
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  4. #4
    Valued Forum Contributor
    Join Date
    04-13-2011
    Location
    Ottawa, Canada
    MS-Off Ver
    365
    Posts
    1,080

    Re: CHOOSE Function (Automatic) - Automatic Choose Array

    Thanks for replying Norie and FDibbins!

    To be honest, I'm not an excel expert. Would you please enlighten me how to use CHOOSE and Index together?

    Reason I'm using CHOOSE formula is because I'll be "link"ing it to an option button

  5. #5
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: CHOOSE Function (Automatic) - Automatic Choose Array

    dluhut

    The suggestions aren't to use CHOOSE and INDEX together but to use INDEX/MATCH.

    Perhaps if you explained what you are doing, and where the option button comes in it might make things clearer.

  6. #6
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: CHOOSE Function (Automatic) - Automatic Choose Array

    I assume you have your option buttons linked to a cell (which would then show 1,2, 3..). Just use that cell in the INDEX
    =INDEX(B1:G1,1,A1) Where A1 is your cell that is linked to the option buttons.
    Does that make sense?
    ChemistB
    My 2?

    substitute commas with semi-colons if your region settings requires
    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  7. #7
    Valued Forum Contributor
    Join Date
    04-13-2011
    Location
    Ottawa, Canada
    MS-Off Ver
    365
    Posts
    1,080

    Re: CHOOSE Function (Automatic) - Automatic Choose Array

    You are definitely right ChemistB...I have my option button linked to a cell, which in this example is A1.

    Norie, not that I don't want to attach an example, but I haven't even accomplish the initial step where I originally thought of using CHOOSE function to automatically update the Value arrays.

    Thank you for all the contribution. I shall increase your (ChemistB, Norie & FDibbins) reputation...Please check!

  8. #8
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,972

    Re: CHOOSE Function (Automatic) - Automatic Choose Array

    Happy to help and thanks for the feedback

  9. #9
    Valued Forum Contributor
    Join Date
    04-13-2011
    Location
    Ottawa, Canada
    MS-Off Ver
    365
    Posts
    1,080

    Re: CHOOSE Function (Automatic) - Automatic Choose Array

    Hi All,

    Sorry for the trouble! I came back with a question again.

    As you guys have know I'll be linking a cell to an option button. Option button would give me a value of 1, 2, 3...etc. Also, I realized that I have the country to be in a merged...US in column C-E, Canada column F-H etc...always 3 columns merged.

    Is there a way to use Index/Match where when the value of A1 is 1, it'll be US, and 2 will be Canada etc.

  10. #10
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: CHOOSE Function (Automatic) - Automatic Choose Array

    Merged cells, bad idea.

    Perhaps this though.
    Formula: copy to clipboard
    Please Login or Register  to view this content.

  11. #11
    Valued Forum Contributor
    Join Date
    04-13-2011
    Location
    Ottawa, Canada
    MS-Off Ver
    365
    Posts
    1,080

    Re: CHOOSE Function (Automatic) - Automatic Choose Array

    It was indeed the same formula...variable multiply 3 less 2. Thanks Norie!!!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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