+ Reply to Thread
Results 1 to 5 of 5

Combobox List Generation from Range

  1. #1
    Forum Contributor
    Join Date
    02-26-2009
    Location
    Auckland, New Zealand
    MS-Off Ver
    Excel 2010
    Posts
    286

    Combobox List Generation from Range

    I have a dynamic range (ProdList) which has two columns (Category and Product).
    Adjacent to each Category is a Product. Each Category can have multiple Products.
    A Category is entered into cell A1 and then a userform (with the same name as the Category) is opened. I want the combobox (cmbProd), within the userform, to list only the Products that are adjacent to the matching Categories.
    How can I do this? Thanks Sandy

  2. #2
    Forum Expert
    Join Date
    09-20-2011
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    2,278

    Re: Combobox List Generation from Range

    Hello Sandy
    I'm not exactly sure about your sheet layout but if each Category is grouped together with the associated Product alongside, then you could perhaps use a couple of dynamic named ranges to create the Row Source for your User Form Combo Box.

    In the attached example, the named range 'ProdListbyCat' is the Row Source of the Combo Box. The User Form is Initialized from the Worksheet Change Event in Cell A2. The User Form Initialize Event loads the Combo Box Row Source and User Form Caption.

    Hope this gives you a few ideas.
    DBY
    Attached Files Attached Files

  3. #3
    Forum Contributor
    Join Date
    02-26-2009
    Location
    Auckland, New Zealand
    MS-Off Ver
    Excel 2010
    Posts
    286

    Re: Combobox List Generation from Range

    Thanks DBY that's exactly what I wanted.
    Just one small addition - I want to add a textbox to show a value adjacent to the selected product.
    In your example, Cat3-Prod10 would show cell value F11.
    How? Thanks Sandy

  4. #4
    Forum Expert
    Join Date
    09-20-2011
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    2,278

    Re: Combobox List Generation from Range

    Hi glad to have helped.
    One way would be to add another named range and Index that in the text box based on the combo selection. See the amended example.

    DBY
    Attached Files Attached Files

  5. #5
    Forum Contributor
    Join Date
    02-26-2009
    Location
    Auckland, New Zealand
    MS-Off Ver
    Excel 2010
    Posts
    286

    Re: Combobox List Generation from Range

    Thanks again, that worked. I can now spend the rest of the day modifying to suit. Cheers Sandy

+ 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. Setting a name as a ComboBox list range
    By AstroZelda in forum Excel General
    Replies: 1
    Last Post: 05-20-2015, 10:38 PM
  2. [SOLVED] ComboBox add entry to Named Range if not in list
    By pjbassdc in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-11-2014, 03:36 PM
  3. [SOLVED] Combobox dropdown to list range from sheet
    By nickmax1 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 12-30-2013, 12:35 PM
  4. setting a combobox list property to a named range
    By matpj in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 09-06-2012, 11:52 AM
  5. List box depending on combobox and add or delete items to range
    By excelkeechak in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-08-2009, 12:48 PM
  6. Create combobox list from autofiltered range without advance filter.
    By GravityInvert in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 06-26-2008, 04:22 AM
  7. [SOLVED] Dynamically assign ComboBox.List from named range areas
    By Paul Martin in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-03-2005, 01:05 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