+ Reply to Thread
Results 1 to 6 of 6

Combobox add item depending on previous cell

  1. #1
    Registered User
    Join Date
    11-01-2012
    Location
    Aberdeen
    MS-Off Ver
    Excel 2016
    Posts
    60

    Combobox add item depending on previous cell

    Hi all,
    I have an excel sheet in the form of my attachment. The first column states the department (cbosubdivision), the second the job level (cbojoblevel) that could be on the same department more than once, and the third some kind of description (cbojobdescription). I have three comboboxes of which the first one shows on a drop down list unique data e.g. Department A, Department B. The second shows depending on the Department chosen, the various choices but only again in a unique drop down list e.g. A,B,C,D. The third combobox i would like it to show the corresponding choices for each of the previous choice, meaning if selected Department A and A, then the choices abc and sdr will be shown on the list of the third combobox to choose. I already found some scripts and applied them appropriately until the second dropbox, but on the third i cannot get it working..
    Any help appreciated.
    Please Login or Register  to view this content.

  2. #2
    Registered User
    Join Date
    11-01-2012
    Location
    Aberdeen
    MS-Off Ver
    Excel 2016
    Posts
    60

    Re: Combobox add item depending on previous cell

    Any help....?

  3. #3
    Forum Guru bakerman2's Avatar
    Join Date
    10-03-2012
    Location
    Antwerp, Belgium
    MS-Off Ver
    MO Prof Plus 2016
    Posts
    6,907

    Re: Combobox add item depending on previous cell

    Which attachment....?
    Avoid using Select, Selection and Activate in your code. Use With ... End With instead.
    You can show your appreciation for those that have helped you by clicking the * at the bottom left of any of their posts.

  4. #4
    Registered User
    Join Date
    11-01-2012
    Location
    Aberdeen
    MS-Off Ver
    Excel 2016
    Posts
    60

    Re: Combobox add item depending on previous cell

    Sorry about that, i thought it uploaded..
    Attached Files Attached Files

  5. #5
    Forum Expert torachan's Avatar
    Join Date
    12-27-2012
    Location
    market harborough, england
    MS-Off Ver
    Excel 2010
    Posts
    4,303

    Re: Combobox add item depending on previous cell

    Is this what you are wanting to achieve.
    It is repetitive code on each combo-box.
    Load an array, remove non-selections by setting values to "", then deleting, then load to 'collection' only uniques for next combo.
    Repeat as many times as the number of cascading comboboxes.
    torachan.
    Attached Files Attached Files

  6. #6
    Forum Guru bakerman2's Avatar
    Join Date
    10-03-2012
    Location
    Antwerp, Belgium
    MS-Off Ver
    MO Prof Plus 2016
    Posts
    6,907

    Re: Combobox add item depending on previous cell

    Another one using dictionaries.

    Please Login or Register  to view this content.
    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)

Similar Threads

  1. Populating ranking depending upon ranges of previous cell's data
    By sryder in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 04-07-2016, 07:49 AM
  2. Auto populate next cell depending on previous column
    By ngocpdn in forum Excel General
    Replies: 3
    Last Post: 01-09-2015, 01:08 AM
  3. Locking or Unlocking validated cells depending on the previous cell
    By biajw in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-05-2014, 11:36 AM
  4. Add value to cell depending on combobox value !
    By Petter120 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 02-09-2012, 02:45 PM
  5. Taking the next item in a list into 1 of 2 tables based on the previous item time
    By SoleAris in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-07-2011, 04:59 PM
  6. Replies: 1
    Last Post: 01-23-2011, 08:00 AM
  7. Adding specific data depending on previous column cell value
    By Gerhard Kriek in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-09-2009, 05:32 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