+ Reply to Thread
Results 1 to 13 of 13

Drop Down List Box HELP URGENT PLEASE!

  1. #1
    Registered User
    Join Date
    08-02-2012
    Location
    lincoln
    MS-Off Ver
    Excel 2010
    Posts
    5

    Drop Down List Box HELP URGENT PLEASE!

    Hi everyone, I have a excel sheet and need to create a drop down box/ combo box in Excel 2010.

    There is two columns that contain the data, 'ID' and ';Locations' I'd like the dropdown box to be populated with Location's column but when the user selects a location instead of saving the name of the location, its save's the Unique ID.

    Is this possible?

  2. #2
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,603

    Re: Drop Down List Box HELP URGENT PLEASE!

    Your drop-down would normally look at one list (locations) and return the chosen value from this list. However, in an adjacent cell you could just have an INDEX/MATCH formula which would return the matching ID, so that you could use this in other formulae. Alternatively, the other formulae could include the INDEX/MATCH part to get the data directly.

    Hope this helps.

    Pete

  3. #3
    Registered User
    Join Date
    08-02-2012
    Location
    lincoln
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: Drop Down List Box HELP URGENT PLEASE!

    Thanks pete, any ideas how I can implement this using Excel 2010 by any chance?

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

    Re: Drop Down List Box HELP URGENT PLEASE!

    Use Data Validation to create the dropdown box (let's say in A1)
    Given that your list is in A5:A500 with what you want returned in B5:B500
    Assuming each item in A appears only once.

    In B1
    =VLOOKUP(A1, $A$5:$B$500,2, FALSE)
    Does that work for you?
    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

  5. #5
    Forum Contributor day92's Avatar
    Join Date
    04-20-2010
    Location
    Los Angeles
    MS-Off Ver
    Excel 360
    Posts
    600

    Re: Drop down box Please help

    Something like this?
    Attached Files Attached Files

  6. #6
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,603

    Re: Drop down box Please help

    Did you not like my earlier answer?

    See the attached. Choose month in B1, B2 shows the number.

    Hope this helps.

    Pete
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    08-02-2012
    Location
    lincoln
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: Drop down box Please help

    Thanks to both of you for your help, yes both suggestions are great. I was just trying to find an easy way to implement an action that fits in with this scenario. I will try it tomorrow when im at work.

    ---------- Post added at 04:17 PM ---------- Previous post was at 04:06 PM ----------

    Pete in your example, is it doing a kind of count funtion? Or is getting the 1-12 numerical values from some where? Thanks for your help.

  8. #8
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,603

    Re: Drop down box Please help

    It's using the MATCH function to look for an exact match and return the (relative) position of the chosen month. I put the months in column M and set up a named range for these, but there is no need for a separate column of position numbers. In fact you can get rid of the column entirely by using a static array in the formula, like {"January","February","March", ... } and so on.

    Hope this helps.

    Pete

  9. #9
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Drop Down List Box HELP URGENT PLEASE!

    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

  10. #10
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,603

    Re: Drop Down List Box HELP URGENT PLEASE!

    Arlette,

    yes, it is - for some reason he started a new thread after this one.

    Pete

  11. #11
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Drop Down List Box HELP URGENT PLEASE!

    I have moved the responses from that thread to this one.

  12. #12
    Registered User
    Join Date
    08-02-2012
    Location
    lincoln
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: Drop Down List Box HELP URGENT PLEASE!

    Is there anyway I can get data values for the drop box anywhere else other than the excel sheet?

    Reason I ask is is this excel sheet I'm using is for a bulk data import into a database and the database doesn's insert named values only Unique ID's.

  13. #13
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,603

    Re: Drop Down List Box HELP URGENT PLEASE!

    Do you mean like the attached?

    The month names are just contained within the DV List for B1 and within the MATCH function in B2, so no need to place them anywhere within the sheet.

    Hope this helps.

    Pete
    Attached Files Attached Files

+ 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