+ Reply to Thread
Results 1 to 6 of 6

Drop Down List Options and value assignment

Hybrid View

  1. #1
    Forum Contributor
    Join Date
    08-10-2009
    Location
    nottingham
    MS-Off Ver
    Excel 2010
    Posts
    110

    Drop Down List Options and value assignment

    Hi,

    I got an issue which i need some help with if possible:

    I've got a selection of drop down lists and used the =CONCATENATE command to bring all the options picked into one cell. I've then used the =VLOOKUP command to pull the information from an array in another worksheet which matches the info in the =CONCATENATE cell.

    I was wondering if it was assign a number to the options in the drop down list that the =CONCATENATE cell can display rather than the text choose?

    for example if option one was "RED", option two was "BALL" and three was "HALLWAY", can i assign "1" to RED, "2" to BALL and "3" to HALLWAY, so the =CONCATENATE cell displays 123, rather than REDBALLHALLWAY.

    It would make my array so much easier to set up as some of the strings needed from the options could turn out like war and peace in the =CONCATENATE cell otherwise.

    Is this possible? Any suggestions appreciated...

    Thanks

  2. #2
    Forum Contributor
    Join Date
    01-30-2013
    Location
    Wales
    MS-Off Ver
    Excel 2013
    Posts
    231

    Re: Drop Down List Options and value assignment

    Set up a number of Option tables with the option text in the left hand column and the number in the right hand column and then set your concatenate cell to vlookup each option table.

    something like.

    =vlookup(option1,Option1table,2,false) & vlookup(option2,option2table,2,false)

    That way you can use the first column in each option table as the validation list for your options, thinking about this you already say you have option lists so if these are in tables then you are half way there already.

    FYI "concatenate" can be shortened to "&"


    Any use?

    Chris
    Click * below if this answer helped

  3. #3
    Forum Contributor
    Join Date
    08-10-2009
    Location
    nottingham
    MS-Off Ver
    Excel 2010
    Posts
    110

    Re: Drop Down List Options and value assignment

    Thanks Chris,

    Thats fantastic and so nearly worked a treat!

    Couldnt figure out why it wasn't working at first before i realised I needed to check the row rather than column so had to change it to HLOOKUP. It's working in all the option boxes accept the first though?

    I added a third drop down list to create the sequence i really need and 2 & 3 work fine - they change number in the sequence perfectly dependent on the option you choose. The first box though shows the wrong number when picked and then refuses to change when other options are picked? Have i made some basic coding error:

    =HLOOKUP(C4,Sheet1!B1:J2,2) & HLOOKUP(C5,Sheet1!B4:F5,2,) & HLOOKUP(C6,Sheet1!A7:D8,2,)
    Last edited by inq80; 09-04-2014 at 12:14 PM.

  4. #4
    Forum Contributor
    Join Date
    08-10-2009
    Location
    nottingham
    MS-Off Ver
    Excel 2010
    Posts
    110

    Re: Drop Down List Options and value assignment

    and my post has been recognised for some reason in the forum so "Bump"?

  5. #5
    Forum Contributor
    Join Date
    08-10-2009
    Location
    nottingham
    MS-Off Ver
    Excel 2010
    Posts
    110

    Re: Drop Down List Options and value assignment

    Hi,

    I've attached the spreadsheet so you can see what I'm talking about in case I'm being hopeless at explaining it:

    The lists to the left all have a value to them dependent on the option picked in the drop down list. The previous advice about combining the lookup command with concatenate command, words great - accept for the first digit and i can't figure out why?

    It should return a "1" for red but is instead returning "2". Also "green" is returning "2", when it should be "4". What on earth have i done wrong?

    It's being used to fetch a certain cell info from the array to the right and that won't work if the returned number is out.

    can anyone please help and advise what I've done wrong?

    Also...

    The numbers in cell H6 only return when all 3 options have been picked; is there away to get it to work when only one or two are selected so it returns "11" or "2" for example? I would then need the vlookup command in cell K20 to display all the returns with the same 1 or 2 starting digits. If anyone can suggest what i need to research to figure this out, it would be appreciated.

    Thanks

    Example.xlsx

  6. #6
    Forum Contributor
    Join Date
    08-10-2009
    Location
    nottingham
    MS-Off Ver
    Excel 2010
    Posts
    110

    Re: Drop Down List Options and value assignment

    sorted the first issue - "red" now return "1" after i sorted the row alphabetically...

    Edit:

    This created a second issue with the vlookup not working because it didn't recognise the hlookup return values as numbers, even after the cell was formatted to "number".

    Got round this by multiplying by 1 so

    =HLOOKUP(H2,B2:E3,2,FALSE)&HLOOKUP(H3,B4:E7,2,FALSE)&HLOOKUP(H4,B8:E15,2,FALSE)

    turned into

    =(HLOOKUP(H2,B2:E3,2,FALSE)&HLOOKUP(H3,B4:E7,2,FALSE)&HLOOKUP(H4,B8:E15,2,FALSE))*1

    resolving this thread - question posed in the title now answered.
    Last edited by inq80; 09-04-2014 at 07:26 PM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. drop down list with options
    By kayye in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 07-03-2013, 12:06 PM
  2. Excel 2007 : Drop Down List and Value Assignment
    By Malarowski in forum Excel General
    Replies: 4
    Last Post: 04-11-2013, 06:16 AM
  3. [SOLVED] Column B drop down list with 2 options, columns C & E with dependent drop down lists
    By betic in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 09-26-2012, 03:47 PM
  4. Drop down list. I need more options
    By cybercab in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 02-26-2007, 12:12 PM
  5. My Excel drop-down list eliminates from list options chosen. Help
    By Sybil in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-19-2006, 05:25 PM

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