Hello,
I have a spreadsheet with 6300 lines. The number of lines in this spreadsheet can vary from week to week.
I have the following macro which looks at column s, looks for "ABC Company", copies the entire row and pastes it on "Tab Client X". It's should find the first empty row starting with row 2.
when I try to run this macro, it ran for SEVERAL minutes before I finally stopped it. I am not sure if it's taking so long because the number of rows in the spreadsheet or because I have something wrong? I know that one issue I have is where it pastes, i don't have it "set" to paste it to the first empty row.
Set MR = Range("S:S")
For Each cell In MR
Sheets("Client").Select
If cell.Value = "ABC Company" Then
cell.EntireRow.Copy
Sheets("Tab Client X").Select
Range("a2").Select
ActiveSheet.Paste
End If
Next cell
End Sub
I have a spreadsheet with 6300 lines. The number of lines in this spreadsheet can vary from week to week.
I have the following macro which looks at column s, looks for "ABC Company", copies the entire row and pastes it on "Tab Client X". It's should find the first empty row starting with row 2.
when I try to run this macro, it ran for SEVERAL minutes before I finally stopped it. I am not sure if it's taking so long because the number of rows in the spreadsheet or because I have something wrong? I know that one issue I have is where it pastes, i don't have it "set" to paste it to the first empty row.
Set MR = Range("S:S")
For Each cell In MR
Sheets("Client").Select
If cell.Value = "ABC Company" Then
cell.EntireRow.Copy
Sheets("Tab Client X").Select
Range("a2").Select
ActiveSheet.Paste
End If
Next cell
End Sub