HI There
I am new vba/macros and would like to see if anyone can help me the code below.
When the code is run - it clears the contents of the sheet previous cellsA13:bo3150 which works
Then it copies all rows from CFH sheet starting from row A13 which I want. But I then need to paste it back into the Previous Sheet starting at row A13 - but when it runs it pastes them at the end of the current table rather than starting the paste at row/cell A13.
Sub cpynpst()
Dim PreCFH As Worksheet, CFHAss As Worksheet, lr As Long, rng1 As Range,
'Cleardown Range
Sheets("Previous").Select
Range("A13:BO50006").Select
Selection.ClearContents
Set PreCFH = Sheets("CFH")
Set CFHAss = Sheets("Previous")
lr = PreCFH.Cells(Rows.Count, 1).End(xlUp).Row
Set rng1 = PreCFH.Range("A13:A" & lr)
rng1.EntireRow.Copy CFHAss.Cells(Rows.Count, 1).End(xlUp)(2)
End Sub
Thanks
Magwa
I am new vba/macros and would like to see if anyone can help me the code below.
When the code is run - it clears the contents of the sheet previous cellsA13:bo3150 which works
Then it copies all rows from CFH sheet starting from row A13 which I want. But I then need to paste it back into the Previous Sheet starting at row A13 - but when it runs it pastes them at the end of the current table rather than starting the paste at row/cell A13.
Sub cpynpst()
Dim PreCFH As Worksheet, CFHAss As Worksheet, lr As Long, rng1 As Range,
'Cleardown Range
Sheets("Previous").Select
Range("A13:BO50006").Select
Selection.ClearContents
Set PreCFH = Sheets("CFH")
Set CFHAss = Sheets("Previous")
lr = PreCFH.Cells(Rows.Count, 1).End(xlUp).Row
Set rng1 = PreCFH.Range("A13:A" & lr)
rng1.EntireRow.Copy CFHAss.Cells(Rows.Count, 1).End(xlUp)(2)
End Sub
Thanks
Magwa