Reset a value or content of dependent drop down list

  • Hi, I already have the below code, unfortunately it only applies to one Cell. I'd like to have it applied all the way down from L4 to L4500. This is in relation to thread http://www.ozgrid.com/forum/showthread.php?t=148682 Option Explicit Private Sub Worksheet_Change(ByVal Target As Range) If Target.Cells.Count > 1 Then Exit Sub If Not Intersect(Target, Range("L4")) Is Nothing Then Range("M4").ClearContents End If End Sub

  • Re: Reset a value or content of dependent drop down list


    Hello,


    Within the initial code ... you can modify both Ranges to suit your needs ...


    Code
    1. Option Explicit
    2. Private Sub Worksheet_Change(ByVal Target As Range)
    3. If Target.Cells.Count > 1 Then Exit Sub
    4. ' The Source Range : Range("A1") can be modified ....................................
    5. If Not Intersect(Target, Range("A1")) Is Nothing Then
    6. ' The Destination Range : Range("B1") can also be modified ....................
    7. Range("B1").ClearContents
    8. End If
    9. End Sub


    Hope this will help

    If you feel like saying "Thank You" for the help received, do not hesitate to click the "Like" icon ...just below...in the bottom right corner...:)

  • Re: Reset a value or content of dependent drop down list


    Hi Carim, Thanks for your reply however it seems that I couldn't get that to work. What I want to achieve is that if the first drop down is changed, the value from the second drop down (which is dependent on the first drop-down) will be reset. My initial VB applies only to the first cell. I want this applied to all cells in the column but should be independent with each other. I tried yours but it has the same result. 1st DROP-DOWN 2nd DROP-DOWN FRUIT MANGO FLOWER ROSE SUPERHERO BATMAN Say I was able to pick the above from the data selection . First drop-down is in Column A and the 2nd drop-down in Column B. With my current VB, what is happening is that if I change the cell A2 into FLOWER, the Mango in B2 is being reset which is correct so I can select a new item based on Flower category. But if I change A3 into FRUIT, the value "ROSE" in B3 is still there. I want it reset without affecting B2 and B3 contents.

  • Re: Reset a value or content of dependent drop down list


    Hello again,


    Since it's difficult to guess the macro you are using ...


    why don't you attach a sample workbook in your next message ...

    If you feel like saying "Thank You" for the help received, do not hesitate to click the "Like" icon ...just below...in the bottom right corner...:)