+ Reply to Thread
Results 1 to 14 of 14

Using a formula to link a number (1 through 5) to multiple text choices

Hybrid View

Kiliam30 Using a formula to link a... 06-19-2012, 04:29 PM
rob.barnes01 Re: Using a formula to link a... 06-19-2012, 04:53 PM
Kiliam30 Re: Using a formula to link a... 06-19-2012, 05:24 PM
rob.barnes01 Re: Using a formula to link a... 06-20-2012, 08:48 AM
Kiliam30 Re: Using a formula to link a... 06-20-2012, 12:39 PM
rob.barnes01 Re: Using a formula to link a... 06-20-2012, 01:08 PM
Kiliam30 Re: Using a formula to link a... 06-20-2012, 01:35 PM
rob.barnes01 Re: Using a formula to link a... 06-20-2012, 01:45 PM
Kiliam30 Re: Using a formula to link a... 06-20-2012, 02:08 PM
rob.barnes01 Re: Using a formula to link a... 06-20-2012, 02:34 PM
Kiliam30 Re: Using a formula to link a... 06-20-2012, 05:02 PM
rob.barnes01 Re: Using a formula to link a... 06-21-2012, 08:09 AM
Kiliam30 Re: Using a formula to link a... 06-21-2012, 11:13 AM
Kiliam30 Re: Using a formula to link a... 06-21-2012, 11:25 AM
  1. #1
    Registered User
    Join Date
    06-19-2012
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    8

    Using a formula to link a number (1 through 5) to multiple text choices

    Good afternoon.

    My questions regards using a formula to select numerous choices from another set of choices in one cell. For instance, I have a question on my survey that asks people to rate their top 5 priorities out of 17 choices. The formula I want to create will need to organize one cell with 1 through 5 rankings; yet each ranking will be different from one person to the other and will be spread over 17 choices.

    Choices Rankings
    Cars 3
    Train 5
    Boat 1
    House 2
    Business 4
    Factory
    Store
    Church


    The above shows an example of what my excel sheet will look like. Notice there will be blanks from the other 12 choices. I want the formula to link with what someone answers with a 1 to the choice they selected and can also be changed from one person to the other for all 17 choices. Can anyone help?

  2. #2
    Registered User
    Join Date
    06-19-2012
    Location
    N/A
    MS-Off Ver
    Excel 2007
    Posts
    46

    Re: Using a formula to link a number (1 through 5) to multiple text choices

    I placed your sample data set in A1:B8 and entered the following array formula (ctrl-Enter) in C1. Seems to do the trick:

    ="1. "&INDEX(A1:B8,MATCH(1,B1:B8,0),1)&", 2. "&INDEX(A1:B8,MATCH(2,B1:B8,0),1)&", 3. "&INDEX(A1:B8,MATCH(3,B1:B8,0),1)&", 4. "&INDEX(A1:B8,MATCH(4,B1:B8,0),1)&", 5. "&INDEX(A1:B8,MATCH(5,B1:B8,0),1)
    Hope this helps.

    Geez, I'm a bonehead. I meant CTRL-SHIFT-ENTER for an array formula ... ugh.
    Last edited by rob.barnes01; 06-20-2012 at 09:46 AM.

  3. #3
    Registered User
    Join Date
    06-19-2012
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    8

    Re: Using a formula to link a number (1 through 5) to multiple text choices

    Thank you, Rob! I am not too familiar with INDEX or Match. How do you get it to show the other 4 rankings in the row?

  4. #4
    Registered User
    Join Date
    06-19-2012
    Location
    N/A
    MS-Off Ver
    Excel 2007
    Posts
    46

    Re: Using a formula to link a number (1 through 5) to multiple text choices

    Hi Kiliam,

    The formula I suggested is a concatenation of 5 nearly identical INDEX-MATCH formulas and a few text strings to provide better readability. The only value that changes in each iteration of the INDEX-MATCH formula is the lookup_value within the MATCH portion of the formula:

    ="1. "&INDEX(A1:B8,MATCH(1,B1:B8,0),1)&", 2. "&INDEX(A1:B8,MATCH(2,B1:B8,0),1)&", 3. "&INDEX(A1:B8,MATCH(3,B1:B8,0),1)&", 4. "&INDEX(A1:B8,MATCH(4,B1:B8,0),1)&", 5. "&INDEX(A1:B8,MATCH(5,B1:B8,0),1)

    In a nutshell, each INDEX-MATCH formula is saying "Within the range A1 to B8, locate a value (in this case a number) in the range B1 to B8. When that exact number is found, return the value from column 1 of the indexed range.

    Note that the MATCH type can be a 0, 1, or -1. A 0 means the MATCH formula will look for an exact match to the lookup_value, a 1 will return the largest value which is less than or equal to the lookup_value and a -1 will return the smallest value greater than or equal to the lookup_value.

    It's similar to a VLOOKUP, except for the fact that INDEX-MATCH can look to the left as well as the right and it can be used to look up a value based on multiple criteria. It's important to remember to enter these formulas as array formulas by using CTRL-SHIFT-ENTER.

    As always, I'm sure there is more than one way to approach this challenge, but this is how I chose to approach it. Hope this helps.
    Last edited by rob.barnes01; 06-20-2012 at 09:45 AM.

  5. #5
    Registered User
    Join Date
    06-19-2012
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    8

    Re: Using a formula to link a number (1 through 5) to multiple text choices

    It does, thank you. Though, I have another question. Let's say I add a Cities column with 60 possible Cities to the beginning of the columns going down 60 rows. Also, the choices column is now in one row with the choices (as if it is a heading) spread out over 17 columns with the rankings below each of the 17 columns. How do I get the formula to stay with the Cities column but spread out over a row? Meaning, let's say New York answers the survey and so does Chicago but New York answers first. I will have another (This will be a survey sent out to actual cities through SurveyMonkey but not all cities will respond and not in alphabetical order lol). I will be downloading the excel file given by SurveyMonkey and pasting their excel file table into my excel sheet above my excel table (set around row 110 to account for additional room) but I want to have my table ready with the formulas to depict where New York or Chicago is in the SHORT list of respondents (from their excel table) to input the data for these cities in my list of ALL 60 cities. Hope that doesn't sound too confusing but it is frustrating me like crazy.

  6. #6
    Registered User
    Join Date
    06-19-2012
    Location
    N/A
    MS-Off Ver
    Excel 2007
    Posts
    46

    Re: Using a formula to link a number (1 through 5) to multiple text choices

    If I'm understanding your needs correctly, the attached spreadsheet should get you on your way:

    Book1.xls

  7. #7
    Registered User
    Join Date
    06-19-2012
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    8

    Re: Using a formula to link a number (1 through 5) to multiple text choices

    Yes, that is what I meant! The only difference is that the excel table I made can not go to the left since I have other answers to other questions. I have to put my table below it and I have to separate each choice. I didn't know we could attach the excel file...would have been easier lol. Well, here is the excel file back but I made changes to pretty much how mine looks now. So at the very top, that is what survey monkey will give me back. I will copy that and put it into sheet 1 with my table (that you created) down at 110. to automatically input the data. However, the top table does not have all the cities and is not in order and the rest are blank. The table below will have all the cities i'm expecting to hear back. Yet, I want my table to depict where New York is in the list to put it in my New York in my table and know what rank number it is out of the 5 ranks.
    Attached Files Attached Files

  8. #8
    Registered User
    Join Date
    06-19-2012
    Location
    N/A
    MS-Off Ver
    Excel 2007
    Posts
    46

    Re: Using a formula to link a number (1 through 5) to multiple text choices

    OK, take a look and let me know if we're on track. Now, as you add cities to the list at the top, they'll populate the table below (assuming the city names are identical).

    Getting closer?

    Book1.xlsx
    If I have helped, please click the star below.

  9. #9
    Registered User
    Join Date
    06-19-2012
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    8

    Re: Using a formula to link a number (1 through 5) to multiple text choices

    Yeah, it does! What does that formula mean exactly?

  10. #10
    Registered User
    Join Date
    06-19-2012
    Location
    N/A
    MS-Off Ver
    Excel 2007
    Posts
    46

    Re: Using a formula to link a number (1 through 5) to multiple text choices

    In the body of the bottom table, I have a VLOOKUP enclosed in an error-handler which returns nothing if there is an error. Additionally, the formula returns nothing if there is no value in the corresponding cell in the top table. Without the ISBLANK formula, any blank cell in the top table would be represented by a "0" in the bottom table.

    The concatenated INDEX/MATCH formula is the same as before with a provision to return nothing in the event of an error.

  11. #11
    Registered User
    Join Date
    06-19-2012
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    8

    Re: Using a formula to link a number (1 through 5) to multiple text choices

    Ah, well that is really complicated stuff. Thank you for helping me though! By the way, if I have other questions (which I KNOW I will tomorrow), will it be alright to ask you? I will probably send you the actual excel file to get a complete idea with what I mean. The person I am doing this for is being really picky about what she wants.

  12. #12
    Registered User
    Join Date
    06-19-2012
    Location
    N/A
    MS-Off Ver
    Excel 2007
    Posts
    46

    Re: Using a formula to link a number (1 through 5) to multiple text choices

    I'll be more than happy to help if I can. That said, things are starting to pick up here at work so the timeliness of my responses might vary a bit.

    Take care,
    Rob

  13. #13
    Registered User
    Join Date
    06-19-2012
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    8

    Re: Using a formula to link a number (1 through 5) to multiple text choices

    By the way, I sent you a private message. However, it will not allow me to send you an attachment that way. I submitted a friend request to see if that will allow me to do it, if not could I email it to you?

  14. #14
    Registered User
    Join Date
    06-19-2012
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    8

    Re: Using a formula to link a number (1 through 5) to multiple text choices

    I sent you the file.
    Last edited by Kiliam30; 06-21-2012 at 11:35 AM. Reason: delete

+ 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