+ Reply to Thread
Results 1 to 4 of 4

Dependent Dropdowns, clearing dependent value when parent value changes

  1. #1
    Registered User
    Join Date
    08-30-2013
    Location
    Seattle, WA
    MS-Off Ver
    Excel 2010
    Posts
    11

    Dependent Dropdowns, clearing dependent value when parent value changes

    Hi- I grabbed some code from a previous thread
    http://www.excelforum.com/excel-gene...-dropdown.html

    to make the second dropdown [D2] go blank when the first is changed [D1]

    ------------------------------------------------------------------
    [Row1]: [D1] <-If I change this value [D2] <-This value should be cleared out
    ------------------------------------------------------------------

    It works great, however, when I delete a row [Row1] this code fires and blanks out the dropdown value [D2] of the next row [Row2] in the table, while leaving the value of the first dropdown [D1] intact. I don't want my [Row2] values to be affected if I happen to delete a row.
    How can I make the code only fire when I am specifically changing the value of [D2] and not making other changes (like deleting a row)?

    ------------------------------------------------------------------
    [Row1]: [D1] [D2] <-If I delete this whole row
    [Row2]: [D1] [D2] <-The value in D2 of this row gets cleared out. I don't want any values in Row 2 to be affected if I decide to delete Row1
    ------------------------------------------------------------------

    Please Login or Register  to view this content.

  2. #2
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: Dependent Dropdowns, clearing dependent value when parent value changes

    Try:-

    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    08-30-2013
    Location
    Seattle, WA
    MS-Off Ver
    Excel 2010
    Posts
    11

    Re: Dependent Dropdowns, clearing dependent value when parent value changes

    Hi mehmetcik-
    I tried your code, substituting the column name of [D2], as follows:

    Please Login or Register  to view this content.
    I couldn't get it to work
    I'm attaching a sample file, I commented out your two lines of additional code, so you can see the before and after

    I also tried many substitutions for the

    Please Login or Register  to view this content.
    line

    tried (separately), all of the following

    Please Login or Register  to view this content.
    adding the code made the original functionality stop working.

    I'm sure I'm missing something simple.
    help !!!
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    08-30-2013
    Location
    Seattle, WA
    MS-Off Ver
    Excel 2010
    Posts
    11

    Re: Dependent Dropdowns, clearing dependent value when parent value changes

    figured it out, just need to add the first of the two lines, the following solves the problem.

    Please Login or Register  to view this content.

+ 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: 2
    Last Post: 07-11-2013, 10:04 AM
  2. Dependent Nested Dropdowns
    By ACFHogan in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 06-05-2013, 03:04 AM
  3. Dependent dropdowns
    By Jogier505 in forum Excel General
    Replies: 5
    Last Post: 12-30-2009, 08:39 PM
  4. Dependent Dropdowns from a Sorted List
    By raveepoojari in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 05-06-2009, 07:28 AM
  5. [SOLVED] 3+ Dynamic Dependent dropdowns?
    By KD in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-20-2006, 01:15 PM

Tags for this Thread

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