i have a file with 600000 Row and i use this code
[vba]
With ActiveSheet
lastrow = Range("B1").End(xlDown).Row
x = 1
For i = 1 To lastrow
If .Cells(i, 1).Value = "" Then
.Rows(i).Copy
Sheets("Sheet2").Rows(x).PasteSpecial (xlPasteAll)
x = x + 1
End If
Next i
End With
[/vba]
This code will copy only the row that their B column have a data to Sheet 2
but it is work till 32000 row after that runtime error and in debug show
x = x + 1
how can fix this problem ?
Thank you .