G
Guest
I am trying to copy a row from one sheet based on a certain criteria and then
copy it to another sheet. The below code works fine, but it take quite a
while to run through a couple thousand rows. I am trying to write the code
to just paste the row in the correct spot from the original sheet and not
activate the target sheet. Is this possible? The bottom case is code is my
feeble attempt... new to VBA
WORKING CODE - BUT SLOW
Case Is = "ALASK"
ActiveCell.EntireRow.Select
Selection.copy
Sheets("Alaska Option").Select
Range("A1").Select
Selection.End(xlDown).Select
ActiveCell.Offset(1, 0).Select
ActiveSheet.Paste
DESIRED CODE - DOESN'T WORK!
Case Is = "ALASK"
ActiveCell.EntireRow.copy
Sheets("Alaska Option").Range("A1").End(xlDown).Offset(1, 0).Paste
Thanks,
Adam
copy it to another sheet. The below code works fine, but it take quite a
while to run through a couple thousand rows. I am trying to write the code
to just paste the row in the correct spot from the original sheet and not
activate the target sheet. Is this possible? The bottom case is code is my
feeble attempt... new to VBA
WORKING CODE - BUT SLOW
Case Is = "ALASK"
ActiveCell.EntireRow.Select
Selection.copy
Sheets("Alaska Option").Select
Range("A1").Select
Selection.End(xlDown).Select
ActiveCell.Offset(1, 0).Select
ActiveSheet.Paste
DESIRED CODE - DOESN'T WORK!
Case Is = "ALASK"
ActiveCell.EntireRow.copy
Sheets("Alaska Option").Range("A1").End(xlDown).Offset(1, 0).Paste
Thanks,
Adam