Hi, I am trying to adapt the code I found here to my needs. I want to copy the string "G7:G369" in WS "data_rev&stats" based on the value of the cell "G5" (this value will change everyday with a +1 increment) to the WS "MTD_data_rev&stats" 2 cells below the corresponding value found in the range "5:5". The idea is to have historical data day by day throughout the month.
So I manage to copy the string I want but I cannot manage to select the cell located below the matching value.
Could anyone help me out to finish the code? Thanks a lot! Let me know if I need to clarify :D
This is the source sheet with the incremental value in yellow
This is the destination sheet
So I manage to copy the string I want but I cannot manage to select the cell located below the matching value.
Could anyone help me out to finish the code? Thanks a lot! Let me know if I need to clarify :D
Code:
Sub export_MTD()
Dim myDate As Variant
Dim myValues As String
myDate = Worksheets("day_data_rev&stats").Range("G5").Value
myValues = Worksheets("day_data_rev&stats").Range("G7:G369").Copy
'Note that this will overwrite whatever was already in the col
Worksheets("MTD_data_rev&stats").Range("5:5").Find(myDate).Offset(2, 0).Select
End Sub
This is the source sheet with the incremental value in yellow
This is the destination sheet