Craig_Moore
Board Regular
- Joined
- Dec 12, 2018
- Messages
- 64
- Office Version
- 2019
- Platform
- Windows
Hi i am trying to copy a range of cells G4:G19 from one workbook sheet to another but when pasting in to the second workbook i need the cells to paste to C5 but every time the code runs it needs detect the next free empty colum
i have manage to source the below code but this is used on one work book and i have no idea on what i need to change to make it copy to the new sheet
any help is greatly received
thanks
Craig
Sub CopyPaste()
Application.ScreenUpdating = False
Dim copySheet As Worksheet
Dim pasteSheet As Worksheet
Set copySheet = Worksheets("OVERVIEW")
Set pasteSheet = Worksheets("master downtime sheet")
copySheet.Range("G4:G19").Copy
pasteSheet.Cells(5, Columns.Count).End(xlToLeft).Offset(0, 1).PasteSpecial xlPasteValues
Application.CutCopyMode = False
Application.ScreenUpdating = True
End Sub
i have manage to source the below code but this is used on one work book and i have no idea on what i need to change to make it copy to the new sheet
any help is greatly received
thanks
Craig
Sub CopyPaste()
Application.ScreenUpdating = False
Dim copySheet As Worksheet
Dim pasteSheet As Worksheet
Set copySheet = Worksheets("OVERVIEW")
Set pasteSheet = Worksheets("master downtime sheet")
copySheet.Range("G4:G19").Copy
pasteSheet.Cells(5, Columns.Count).End(xlToLeft).Offset(0, 1).PasteSpecial xlPasteValues
Application.CutCopyMode = False
Application.ScreenUpdating = True
End Sub