C
colwyn
I'm using Excel 2007 and my s/s is 360000 rows deep.
To cut+paste formulas+formats from one column to another I'm using th
following code:
Code
-------------------
Sub move_formula_and_formats_from_I_to_L()
Dim cell As Range
Application.ScreenUpdating = False
For Each cell In Range("I1", Cells(Rows.Count, "I").End(xlUp))
With cell
If .HasFormula And Not .Offset(1).HasFormula Then
.Cut Destination:=.Offset(1, 3)
End If
End With
Next cell
Application.ScreenUpdating = True
End Sub
-------------------
The code stops working after 159000 rows and highlights (in yellow) th
line:
.Cut Destination:=.Offset(1, 3)
Can anyone help with this??
Small XML attachment may help better understand.
Big thanks.
Colwyn
+-------------------------------------------------------------------
|Filename: example.xls
|Download: http://www.thecodecage.com/attachment.php?attachmentid=18
+-------------------------------------------------------------------
To cut+paste formulas+formats from one column to another I'm using th
following code:
Code
-------------------
Sub move_formula_and_formats_from_I_to_L()
Dim cell As Range
Application.ScreenUpdating = False
For Each cell In Range("I1", Cells(Rows.Count, "I").End(xlUp))
With cell
If .HasFormula And Not .Offset(1).HasFormula Then
.Cut Destination:=.Offset(1, 3)
End If
End With
Next cell
Application.ScreenUpdating = True
End Sub
-------------------
The code stops working after 159000 rows and highlights (in yellow) th
line:
.Cut Destination:=.Offset(1, 3)
Can anyone help with this??
Small XML attachment may help better understand.
Big thanks.
Colwyn
+-------------------------------------------------------------------
|Filename: example.xls
|Download: http://www.thecodecage.com/attachment.php?attachmentid=18
+-------------------------------------------------------------------