Hi,
I have the below code that copy and pastes full rows from one sheet to another based on certain criteria. It's currently pasting into column A on the next blank row but I would like it to paste in column B. I've taken this from a sheet I created years ago so apologies if it's messy! Is anyone able to help please?
Private Sub CommandButton1_Click()
a = Worksheets("time analyser").Cells(Rows.Count, 1).End(xlUp).Row
For i = 2 To a
If Worksheets("time analyser").Cells(i, 2).Value = "BaU 2022 - Fortnightly planning calls (strat support)" Then
Worksheets("time analyser").Rows(i).Copy
Worksheets("BAU strategic support").Activate
B = Worksheets("BAU strategic support").Cells(Rows.Count, 1).End(xlUp).Row
Worksheets("BAU strategic support").Cells(B + 1, 1).Select
ActiveSheet.Paste
Worksheets("time analyser").Activate
End If
Next
Application.CutCopyMode = False
ThisWorkbook.Worksheets("time analyser").Cells(1, 1).Select
MsgBox ("Fortnightly planning calls ready")
End Sub
Thank you!
I have the below code that copy and pastes full rows from one sheet to another based on certain criteria. It's currently pasting into column A on the next blank row but I would like it to paste in column B. I've taken this from a sheet I created years ago so apologies if it's messy! Is anyone able to help please?
Private Sub CommandButton1_Click()
a = Worksheets("time analyser").Cells(Rows.Count, 1).End(xlUp).Row
For i = 2 To a
If Worksheets("time analyser").Cells(i, 2).Value = "BaU 2022 - Fortnightly planning calls (strat support)" Then
Worksheets("time analyser").Rows(i).Copy
Worksheets("BAU strategic support").Activate
B = Worksheets("BAU strategic support").Cells(Rows.Count, 1).End(xlUp).Row
Worksheets("BAU strategic support").Cells(B + 1, 1).Select
ActiveSheet.Paste
Worksheets("time analyser").Activate
End If
Next
Application.CutCopyMode = False
ThisWorkbook.Worksheets("time analyser").Cells(1, 1).Select
MsgBox ("Fortnightly planning calls ready")
End Sub
Thank you!