kbay808
asked on
VBA - How to copy range and paste the values to the right of todays date in another range?
In the attached example, I need to copy range B2:E2 and then paste the values to the right of todays date that is located in column G.
Example-File.xlsx
Example-File.xlsx
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I got it. It was an easier fix than I thought.
Sub MoveToToday()
Dim Res As Variant
Res = Application.Match(CLng(Date) - 1, Sheets("Sheet1").Range("G:G"), 0)
If Not IsError(Res) Then
Range("B2:E2").Copy
Range("H" & Res).PasteSpecial xlPasteValues
End If
End Sub
ASKER
Thank you very much
ASKER