Clearing fields when differnt function selected

X

Xman

OK, I have a spreadsheet-packing list thats gets populated from 3 differrent
list's depending on what kind of slip I'm preparing via a drop down menu. Is
there a way clear the exsisting information on the sheet when I make a
selection in the dropdown menu to select another slip. Cureently, I have to
manually delete everything. Thanks in advance.
 
T

teylyn

Hello JARoman,

the following code needs to go into the Sheet module



VBA Code:
--------------------


Private Sub Worksheet_Change(ByVal Target As Range)
If (Target.Row >= 20 And Target.Row <= 33 And Target.Column = 3) Then
Worksheets("Sheet1").Range("E" & Target.Row).ClearContents
End If
End Sub
--------------------




The macro monitors cells column C (column # = 3), rows 20 to 33. Thes
cells have data validation with dropdown lists. If one of these cells i
changed, the value in column E of the same row is cleared.

Adjust references to suit your needs.

cheers, teylyn


OK, I have a spreadsheet-packing list thats gets populated from
differrent
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top