I'm trying to get a date checked against a list of dates and if found I need to shuffle a value from one column across to another on the same row.
The below is what I started doing, which works but I'm sure this is a cleaner way to look up against a list?
Sub Date_Check()
Dim lw As Long
Dim c As Range
Dim myDate, myDate1, myDate2, myDate3 As Date
myDate = Sheets("Cover").Range("G8")
myDate1 = Sheets("Cover").Range("G9")
myDate2 = Sheets("Cover").Range("G10")
lw = Range("A" & Rows.count).End(xlUp).Row
For Each c In Range("A1:A" & lw)
If c = myDate Or c = myDate1 Or c = myDate2 Or c = myDate3 Then
c.Offset(0, 6).Cut
c.Offset(0, 9).Activate
ActiveSheet.Paste
End If
Next c
End Sub
I've search to see what I can find and see array being reference but I'm unsure how this works correctly?
Any guidance would be greatly appreciated.
Thank you.