+ Reply to Thread
Results 1 to 4 of 4

Creating a Range of a Listbox based on the Selection Made in Another ListBox

  1. #1
    Registered User
    Join Date
    02-08-2013
    Location
    toronto, ON
    MS-Off Ver
    Excel 2010
    Posts
    10

    Creating a Range of a Listbox based on the Selection Made in Another ListBox

    I have two lists mainly TV Brand & There Models.


    List 1 (TV Brand)
    Sony
    LG
    Samsung


    Depended List 2 (Models)
    Sony LG Samsung
    EX420 55EB9600 PL43E450A1FXZP
    EX430 77EC9800 PL43E490B4FXZP
    EX550 55EA8800 PL43E400U1FXZP
    EX520 KN55S9C UN32EH5300FXZP
    EX645 55EA9800 PL64E8000GFXZP

    I'm using two Listboxes (Form Control) with multiple selection options namely Listbox 1 (Brand) & Listbox 2 (Models). I want listbox 2 input range to be depended on selection made on Listbox 1 (Brand). For example, if user selects Sony then box2 should show only Sony's models and if user selects Sony & LG, box2 should show models for both Sony & LG.

  2. #2
    Forum Expert
    Join Date
    06-26-2010
    Location
    Austin, TX
    MS-Off Ver
    Excel 2010
    Posts
    1,673

    Re: Creating a Range of a Listbox based on the Selection Made in Another ListBox

    Here is a step by step process with pictures: http://www.contextures.com/xlDataVal02.html
    Pauley
    --------
    If I helped with your issue, I'd appreciate a rep bump (hit the '*' icon to the bottom left of this post).

  3. #3
    Registered User
    Join Date
    02-08-2013
    Location
    toronto, ON
    MS-Off Ver
    Excel 2010
    Posts
    10

    Re: Creating a Range of a Listbox based on the Selection Made in Another ListBox

    I'm looking for dependent list populated based not only single selection but also multiple selection. Sample file is attached.
    Attached Files Attached Files

  4. #4
    Forum Expert
    Join Date
    06-26-2010
    Location
    Austin, TX
    MS-Off Ver
    Excel 2010
    Posts
    1,673

    Re: Creating a Range of a Listbox based on the Selection Made in Another ListBox

    Hmmm, okay. I usually use ActiveX controls as they seem more accessible and provide more features. Not sure what your VBA level is, but I'll assume you are getting stuck on determining what was selected and/or how to populate and know how to loop through cells and perform comparisons.

    sheets("Sheet1").listboxes(1).selected(x)
    will tell you if item number x is selected in the first listbox. If true, then you will need to use something like this to add an item to the second listbox:
    sheets("Sheet1").listboxes(2).additem range("S4")

+ 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] Indexing proper range in listbox depending on selection in previous listbox
    By bloodmeat in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-02-2013, 02:31 PM
  2. Replies: 12
    Last Post: 08-28-2012, 07:09 AM
  3. Multi select Listbox Items selection based on other Listbox item selection.
    By srinivassathi in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-20-2011, 05:53 AM
  4. populate listbox based on selection in previous listbox
    By sarahng86 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-28-2007, 10:55 PM
  5. Replies: 0
    Last Post: 11-30-2005, 12:50 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