I am trying to create a macro to copy and paste a range of cells from the previous sheet (i've been using ActiveSheet.Previous.Select) to the sheet that I ran the macro on only (I've been using ActiveSheet.Select). The active sheet is a copy of the previous sheet with a different name (names are Fri, Sat, Sun, etc. and are formatted exactly the same).
The ranges that I would like to copy is: M61:M84, N61:O84 (merged columns), P61:T84, and R85:R86 (merged rows)
Here is the code I currently have, but it is not working as I had hoped.
Sub copy_vessel_personnel()
'freezes screen
ScreenUpdating = False
' copy vessel personnel from prior sheet
ActiveSheet.Previous.Select
Range("M61:M84").Select
Selection.Copy
ActiveSheet.Select
Range("M61:M84").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
ActiveSheet.Previous.Select
Range("N61:O84").Select
Application.CutCopyMode = False
Selection.Copy
ActiveSheet.Select
Range("N61:O84").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
ActiveSheet.Previous.Select
Range("P61:T84").Select
Application.CutCopyMode = False
Selection.Copy
ActiveSheet.Select
Range("P61:T84").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
ActiveSheet.Previous.Select
Range("R85:R86").Select
Application.CutCopyMode = False
Selection.Copy
ActiveSheet.Select
Range("R85:R86").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
End Sub
Thanks,
Jordan
Bookmarks