+ Reply to Thread
Results 1 to 3 of 3

Cascading combo box and dynamic ranges

  1. #1
    Forum Contributor
    Join Date
    03-27-2012
    Location
    England
    MS-Off Ver
    Excel 2007
    Posts
    290

    Cascading combo box and dynamic ranges

    I want to create a cascading combo box from some values that I have, ill explain how I approached it.

    Cascading combo box is a combobox which values are obtained depending on the answer of a previous combo box.
    So I set up a little table like so:
    Categories Car Train Bike
    Car Mercades First Honda
    Train Ford Western Ducati
    Bike Skoda Red Suzuki

    and the combo boxes would be set aside from that.
    I collected the data in Named Ranges (A Range for Categories, A Range for Car, A Range for Train...)

    The first data validation box contains = Categories
    the second data validation box contains =INDIRECT($C$2) (Where C2 was the range of the first validation box)

    Once this was working, I decided to change the formula for the named ranges to allow me to add more values.
    The formula was: =$F3$F8
    I changed it to: =OFFSET($F$3,0,0,COUNTA($F3:$F96),1)

    I expected this to work however, it just doesnt.... when clicking on the drop down arrow for the validation box, nothing happens. No box or values or dropdown.

    anyone know why? or how I can achieve this?

  2. #2
    Forum Contributor
    Join Date
    03-14-2012
    Location
    location
    MS-Off Ver
    Excel 2007
    Posts
    170

    Re: Cascading combo box and dynamic ranges

    Hi,
    perhaps something like this
    let's say you have in col A "categories", Col B "car", Col C "train", Col D "bike"
    in a userform add 2 comboboxes then add this piece of code for combobox1:
    Please Login or Register  to view this content.
    and this one for userform
    Please Login or Register  to view this content.
    or
    http://www.contextures.com/xlDataVal02.html
    blue

  3. #3
    Forum Contributor
    Join Date
    08-14-2013
    Location
    Here and there
    MS-Off Ver
    Excel 2010
    Posts
    376

    Re: Cascading combo box and dynamic ranges

    Hi Penfold1991,

    Attached is an example using Drop-down Data Validation in place of the Combo.

    DATA VALIDATION - NOT COMBO.xlsx


+ 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. Replies: 5
    Last Post: 07-28-2014, 11:53 AM
  2. [SOLVED] Adding dynamic named ranges to combo boxes in userform
    By Spritz in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 06-04-2013, 09:45 AM
  3. [SOLVED] Cascading Comboboxes With Multiple Dynamic Named Ranges?
    By spamad in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 03-20-2013, 10:52 AM
  4. HELP! Excel Data Validation Combo box using dynamic ranges
    By Magnet in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-05-2012, 10:37 AM
  5. Cascading dropdown list with dynamic ranges
    By devunow in forum Excel General
    Replies: 3
    Last Post: 11-04-2008, 09:56 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