I have a validation list that when a specific date is selected, it runs a "PasteData" macro.
How do I insert code to automatically loop through all the dates in the list, any time there is a change in the Sheet?
The PasteData sub runs perfectly, just trying to make this more automatic.
Sub Worksheet_Change(ByVal Target As Range)
Set Target = Range("B3")
If Target.Value = "Nov 20" Then
Call PasteData
End If
Set Target = Range("B3")
If Target.Value = "June 21" Then
Call PasteData
End If
Set Target = Range("B3")
If Target.Value = "Nov 21" Then
Call PasteData
End If
Set Target = Range("B3")
If Target.Value = "June 22" Then
Call PasteData
End If
Set Target = Range("B3")
If Target.Value = "Nov 22" Then
Call PasteData
End If
Set Target = Range("B3")
If Target.Value = "June 23" Then
Call PasteData
End If
Set Target = Range("B3")
If Target.Value = "Nov 23" Then
Call PasteData
End If
End Sub
How do I insert code to automatically loop through all the dates in the list, any time there is a change in the Sheet?
The PasteData sub runs perfectly, just trying to make this more automatic.
Sub Worksheet_Change(ByVal Target As Range)
Set Target = Range("B3")
If Target.Value = "Nov 20" Then
Call PasteData
End If
Set Target = Range("B3")
If Target.Value = "June 21" Then
Call PasteData
End If
Set Target = Range("B3")
If Target.Value = "Nov 21" Then
Call PasteData
End If
Set Target = Range("B3")
If Target.Value = "June 22" Then
Call PasteData
End If
Set Target = Range("B3")
If Target.Value = "Nov 22" Then
Call PasteData
End If
Set Target = Range("B3")
If Target.Value = "June 23" Then
Call PasteData
End If
Set Target = Range("B3")
If Target.Value = "Nov 23" Then
Call PasteData
End If
End Sub