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
Reset a value or content of dependent drop down list
-
itsmejho -
June 9, 2017 at 6:43 AM -
Thread is marked as Resolved.
-
-
-
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 ...
CodeOption Explicit Private Sub Worksheet_Change(ByVal Target As Range) If Target.Cells.Count > 1 Then Exit Sub ' The Source Range : Range("A1") can be modified .................................... If Not Intersect(Target, Range("A1")) Is Nothing Then ' The Destination Range : Range("B1") can also be modified .................... Range("B1").ClearContents End If End Sub
Hope this will help
-
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 ...
Participate now!
Don’t have an account yet? Register yourself now and be a part of our community!