Skip to main content
Support is Offline
Today is our off day. We are taking some rest and will come back stronger tomorrow
Official support hours
Monday To Friday
From 09:00 To 17:30
  Saturday, 20 January 2018
  0 Replies
  2.8K Visits
0
Votes
Undo
First post, I love what you all do here. Using some serious google power I've discovered VBA code to do two things I need to accomplish.

1. I have 3 data validation lists on one tab, and I want the lists to default to the TOP of the list rather than the bottom; I found this awesome code and it WORKS.

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
'Updateby Extendoffice 20160725
Dim xFormula As String
On Error GoTo Out:
xFormula = Target.Cells(1).Validation.Formula1
If Left(xFormula, 1) = "=" Then
Target.Cells(1) = Range(Mid(xFormula, 1)).Cells(1).Value
End If
Out:
End Sub

2. When I change the first data validation list, I want the other 2 cells to clear out and go blank, in this case B74 and B145. I found NUMEROUS websites that boast the same or very similar code, but no single variation I can find (literally pages of google links) works. This is the part that isn't working for me, and I believe it might have something to do with the code above.

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address(0, 0) = "B3" Then
Range("B74,B145").ClearContents
End If
End Sub

Thank you in advance!
There are no replies made for this post yet.