ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   JLG Copy Row (https://www.excelbanter.com/excel-programming/407755-jlg-copy-row.html)

Rpettis31

JLG Copy Row
 
I need help to complete a project.
It sort of works it just takes the last know value row that was true and
copy/pastes it not every row that met the condition as true. It is also
slow, is there another way to speed it up. I have updating false and my calc
to manual.

"JLGWhiz" wrote:

I didn't test this but it should do the job.

If Cells(dlv, 23) "" And Cells(dlv, 8) < _
Sheets("DLV CONTAINERS").Cells(dlv2, 8) Then
lr = Sheets("DLV CONTAINERS").Cells(Rows.Count).End(xlUp).Row
Rows(dlv).Copy Sheets("DLV CONTAINERS").Range("A" & lr + 1)
End If

Check for line wraps in case I didn't get the attenuation mark right.



Gary Keramidas

JLG Copy Row
 
add this to the beginning of your code

Application.ScreenUpdating = False
Application.Calculation = xlCalculationManual

and this to the end:

Application.ScreenUpdating =True
Application.Calculation = xlCalculationAutomatic

--


Gary


"Rpettis31" wrote in message
...
I need help to complete a project.
It sort of works it just takes the last know value row that was true and
copy/pastes it not every row that met the condition as true. It is also
slow, is there another way to speed it up. I have updating false and my calc
to manual.

"JLGWhiz" wrote:

I didn't test this but it should do the job.

If Cells(dlv, 23) "" And Cells(dlv, 8) < _
Sheets("DLV CONTAINERS").Cells(dlv2, 8) Then
lr = Sheets("DLV CONTAINERS").Cells(Rows.Count).End(xlUp).Row
Rows(dlv).Copy Sheets("DLV CONTAINERS").Range("A" & lr + 1)
End If

Check for line wraps in case I didn't get the attenuation mark right.





Rpettis31

JLG Copy Row
 
Gary,

I already have that done as noted in my initial query.

thanks

"Gary Keramidas" wrote:

add this to the beginning of your code

Application.ScreenUpdating = False
Application.Calculation = xlCalculationManual

and this to the end:

Application.ScreenUpdating =True
Application.Calculation = xlCalculationAutomatic

--


Gary


"Rpettis31" wrote in message
...
I need help to complete a project.
It sort of works it just takes the last know value row that was true and
copy/pastes it not every row that met the condition as true. It is also
slow, is there another way to speed it up. I have updating false and my calc
to manual.

"JLGWhiz" wrote:

I didn't test this but it should do the job.

If Cells(dlv, 23) "" And Cells(dlv, 8) < _
Sheets("DLV CONTAINERS").Cells(dlv2, 8) Then
lr = Sheets("DLV CONTAINERS").Cells(Rows.Count).End(xlUp).Row
Rows(dlv).Copy Sheets("DLV CONTAINERS").Range("A" & lr + 1)
End If

Check for line wraps in case I didn't get the attenuation mark right.






Gary Keramidas

JLG Copy Row
 
sorry, you should post in the same thread then.

--


Gary


"Rpettis31" wrote in message
...
I need help to complete a project.
It sort of works it just takes the last know value row that was true and
copy/pastes it not every row that met the condition as true. It is also
slow, is there another way to speed it up. I have updating false and my calc
to manual.

"JLGWhiz" wrote:

I didn't test this but it should do the job.

If Cells(dlv, 23) "" And Cells(dlv, 8) < _
Sheets("DLV CONTAINERS").Cells(dlv2, 8) Then
lr = Sheets("DLV CONTAINERS").Cells(Rows.Count).End(xlUp).Row
Rows(dlv).Copy Sheets("DLV CONTAINERS").Range("A" & lr + 1)
End If

Check for line wraps in case I didn't get the attenuation mark right.






All times are GMT +1. The time now is 08:22 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com