Hello,
I have been trying a variety of methods to get this to work and none of them seem to work. I have a date on my worksheet that populates with today's date. If the value in sheet DataMaintenance, column G matches today's date (can be provided in a cell), I'd like the information from columns H, I, and J to copy over to the worksheet Dashboard2 starting in cell L3, M3 and N3, respectively .
The closest I have come is this code, but all it does is copy over all the data rather than filtering by the date:
Thanks so much!
I have been trying a variety of methods to get this to work and none of them seem to work. I have a date on my worksheet that populates with today's date. If the value in sheet DataMaintenance, column G matches today's date (can be provided in a cell), I'd like the information from columns H, I, and J to copy over to the worksheet Dashboard2 starting in cell L3, M3 and N3, respectively .
The closest I have come is this code, but all it does is copy over all the data rather than filtering by the date:
VBA Code:
Sub TestMacro2()
Dim SrchRng As Range
Dim ce1 As Range
Set SrchRng = Sheets("DataMaintenance").Range("G2:G12")
For Each ce1 In SrchRng
If ce1.value = Sheets("Dashboard2").Range("A4").value Then
Sheets("DataMaintenance").Select
Range("H2").Select
Selection.Copy
Sheets("Dashboard2").Select
Range("L3").Select
ActiveSheet.Paste
Application.CutCopyMode = False
End If
Next ce1
End Sub
Thanks so much!