+ Reply to Thread
Results 1 to 11 of 11

Dynamically populate dropdown values based using VLOOKUP and OFFSET?

  1. #1
    Registered User
    Join Date
    06-11-2012
    Location
    USA
    MS-Off Ver
    Excel 2013
    Posts
    31

    Dynamically populate dropdown values based using VLOOKUP and OFFSET?

    Hi All,

    I am trying to dynamically changing dropdown values in each of the columns of a spreadsheet. I am using OFFSET() to dynamically change the list of values automatically based on the reference list(the reference data is exported from a database on a nightly basis) but I am having trouble getting the dropdown list to filter based on the user entered data. I have attached a spreadsheet example.

    Basically I want the user to be able to enter a value in USER ENTERED VALUE(don't worry about validations, I will add those as separately) and have the Dropdown 1, 2, and 3 dropdowns update dynamically. This could be as easy as VLOOKUPS but again, the data could change daily so OFFSET is critical. I have tried OFFSET(VLOOKUP()) and VLOOKUP(OFFSET()) but cant seem to get it working. You can reference the OFFSET() functions I currently have implemented in the Dropdown columns.

    Thanks in advance
    Attached Files Attached Files

  2. #2
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    43,984

    Re: Dynamically populate dropdown values based using VLOOKUP and OFFSET?

    So we have five thousand empty rows (10 or so would have been plenty), some empty drop boxes and no expected solutions...

    More information and a more proportionately sized worksheet, please.

    If I do XXX I expect to see YYY in cells ZZZ, etc.
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

  3. #3
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,577

    Re: Dynamically populate dropdown values based using VLOOKUP and OFFSET?

    This can be done by Worksheet event
    CODE for the worksheet Product Data
    Please Login or Register  to view this content.
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    06-11-2012
    Location
    USA
    MS-Off Ver
    Excel 2013
    Posts
    31

    Re: Dynamically populate dropdown values based using VLOOKUP and OFFSET?

    Quote Originally Posted by Glenn Kennedy View Post
    So we have five thousand empty rows (10 or so would have been plenty), some empty drop boxes and no expected solutions...

    More information and a more proportionately sized worksheet, please.

    If I do XXX I expect to see YYY in cells ZZZ, etc.
    Sorry about that - the desired outcome is that based on the User Entered Value in column B, columns Dropdown 1, 2, and 3 each will be backed by the proper reference data in a dropdown. For example, if I enter abc123 in User Entered Value, the following dropdowns in each subsequent column will be populated:

    Dropdown 1 Values: Data1, Data 2, Data3, Data4
    Dropdown 2 Values: 2Data1, 2Data 2, 2Data3, 2Data4
    Dropdown 3 Values: 3Data1, 3Data 2, 3Data3, 3Data4

    Regarding the 5000 rows, that was taken from a source sheet and does not factor into the solution. Ideally i could apply the solution to the entire column

  5. #5
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,147

    Re: Dynamically populate dropdown values based using VLOOKUP and OFFSET?

    Modified VBA ..

    Please Login or Register  to view this content.

  6. #6
    Registered User
    Join Date
    06-11-2012
    Location
    USA
    MS-Off Ver
    Excel 2013
    Posts
    31

    Re: Dynamically populate dropdown values based using VLOOKUP and OFFSET?

    Thanks for this - I get an unexpected end sub: compile error. Are there any parameters I need to update?
    Last edited by AliGW; 07-24-2017 at 09:38 AM. Reason: Unnecessary quotation removed.

  7. #7
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,410

    Re: Dynamically populate dropdown values based using VLOOKUP and OFFSET?

    Jake - please don't quote whole posts, especially when you are responding to the one immediately preceding your own - it's just clutter. It's OK to quote if you are responding to a post out of sequence, but limit quoted content to a few relevant lines that makes clear to whom and what you are responding. Thanks!

    For normal conversational replies, try using the QUICK REPLY box below.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  8. #8
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,147

    Re: Dynamically populate dropdown values based using VLOOKUP and OFFSET?

    No changed required: see attached.
    Attached Files Attached Files

  9. #9
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,577

    Re: Dynamically populate dropdown values based using VLOOKUP and OFFSET?

    @JohnTopley
    May I know what is the modification in my code.

  10. #10
    Registered User
    Join Date
    06-11-2012
    Location
    USA
    MS-Off Ver
    Excel 2013
    Posts
    31

    Re: Dynamically populate dropdown values based using VLOOKUP and OFFSET?

    Hi John,

    Thanks - the desired outcome is correct for the example you included but if I enter additional values(such as abc127 in row 5) the values do not filter.

  11. #11
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,147

    Re: Dynamically populate dropdown values based using VLOOKUP and OFFSET?

    @kvsinivasmurthy: I reversed the insertion of commas and changed the MID to LEFT.

    I am sure it will work with MID(DD(T),2) (as it missed off the first letter of the first variable in the drop down).

+ 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. [SOLVED] Populate in-cell dropdown list with values based on sheet name
    By mks16 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 07-21-2015, 09:35 AM
  2. [SOLVED] Display a dropdown list or populate a cell with single value based on other cells' values
    By filla_dilla in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 09-12-2014, 09:47 AM
  3. Replies: 11
    Last Post: 12-03-2013, 03:12 AM
  4. dynamically populate dropdown lists
    By JasperD in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-24-2013, 10:13 AM
  5. Display result dynamically & automatically based on dropdown
    By paradise2sr in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 09-29-2013, 02:07 AM
  6. Replies: 7
    Last Post: 12-16-2012, 04:24 PM
  7. Need To Dynamically Populate Values into a Combo Box
    By vmegha in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 12-07-2005, 07:50 AM

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