Nelson78
Well-known Member
- Joined
- Sep 11, 2017
- Messages
- 526
- Office Version
- 2007
Hello everybody.
I'm dealing with a big amount of datas, about 40k rows.
I need to cut and paste entire rows from a sheet to another, if conditions are not checked.
Example: cut and copy in the sheet Beta if in column A of sheet Alpha <> 36 characters
Assuming - but I'm not sure - that the following code is correct, I bump into a Run-time error '7': Out of memory
How can I manage this deadlock?
I'm dealing with a big amount of datas, about 40k rows.
I need to cut and paste entire rows from a sheet to another, if conditions are not checked.
Example: cut and copy in the sheet Beta if in column A of sheet Alpha <> 36 characters
Assuming - but I'm not sure - that the following code is correct, I bump into a Run-time error '7': Out of memory
Code:
Dim i As Long
For i = Sheets("Alpha").Cells(Rows.Count, 1).End(xlUp).Row To 1 Step -1
If Len(Cells.Value) <> 36 Then
Sheets("Alpha").Range("A" & i).Copy Sheets("Beta").Cells(Rows.Count, 1).End(xlUp).Offset(1)
Cells(i, 1).EntireRow.Delete
End If
Next
How can I manage this deadlock?