Clear previous form selections

NeedhelpinIndiana

New Member
Joined
Nov 6, 2007
Messages
3
I have created a form that utilizes drop down boxes to narrow down the user selection based upon the previous column's input. Thus, C3 selection of size is narrowed down based upon A3 and B3's selections, where B3 section of color, is narrowed down by A3 selection of sleeve length. I am trying to figure out a way to clear out any selections made based upon previous selection input if that input changes. For example: Short sleeve, pink shirt in size XS was selected. If the user were to go back and change it to long sleeve, I want the color and size selections to be cleared and require re-entry in case pink and XS are not applicable combinations for long sleeve shirts. (I'm not dealing with shirts, but this seemed like an easier explanation.) I previously utilized the below vba to do something similar, but it only cleared one cell dependent upon one other specified cell, not a range based upon any previous cell change in a range.


Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Target, Range("e6")) Is Nothing Then
Range("e5").ClearContents
End If
End Sub


I would appreciate any assistance!


Thanks
 

Excel Facts

Control Word Wrap
Press Alt+Enter to move to a new row in a cell. Lets you control where the words wrap.
If the cells are next to one another (example E5, E6, E7) ... you can use Range("E5:E7").ClearContents

If the cells are non-contiguous (example E5, F2, G3) ... you can use Range("E5, F2, G3").ClearContents
 
Upvote 0

Forum statistics

Threads
1,214,923
Messages
6,122,286
Members
449,076
Latest member
kenyanscott

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top