I've searched but can't find the answer to this specific problem I'm having. I am trying to copy a range of data from one worksheet onto a different worksheet after identifying the cell value on the worksheet I'm PASTING TO by the date that matches a cell on the COPY FROM worksheet. Below is my code. The macro works when I run it from the PASTE TO worksheet ('Daily Summary Record') but does not work if I run it from another worksheet. I want to be able to run it from any sheet in the workbook, but especially from the PASTE FROM worksheet. See attachments for images of the two worksheets.
'Daily Itemized')
Sub ArchiveWeek()
Set thisMon = Worksheets("Daily Itemized").Range("F5") 'Assigns variable thisMon as the date value in Daily Itemized Tab, F5 cell
Dim ws As Excel.Worksheet
Dim FoundCell As Excel.Range
Set ws = Worksheets("Daily Summary Record")
Set FoundCell = ws.Range("D:D").Find(what:=thisMon, lookat:=xlWhole)
If Not FoundCell Is Nothing Then
FoundCell.Offset(0, 1).Select 'PROBLEM. Supposed to: Selects the cell to the adjacent right of the cell in column D with the same date as the Itemized F5 cell
Worksheets("Daily Itemized").Range("G5:S11").Copy 'Works to copy range on Daily sheet
FoundCell.Offset(0, 1).Select 'reselects the cell to right of FoundCell
Selection.PasteSpecial xlPasteValues 'works!
MsgBox ("Your week time values have been pasted!")
Else
MsgBox ("The Date of " & thisMon & " was not found in the Daily Summary Record, Column D. Recheck values.")
End If
End Sub