LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default code stops working after X rows.


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 the
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) the
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|
+-------------------------------------------------------------------+

--
colwyn
------------------------------------------------------------------------
colwyn's Profile: http://www.thecodecage.com/forumz/member.php?userid=34
View this thread: http://www.thecodecage.com/forumz/sh...ad.php?t=33071

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
IF just STOPS WORKING Gee Excel Worksheet Functions 21 August 6th 09 05:26 PM
Code runs for a while, then stops working Andrew[_56_] Excel Programming 2 October 18th 07 02:36 PM
VB Code stops working Michelle K Excel Programming 17 August 17th 07 05:58 PM
After sharing workbook VB code stops working. Runtime Error 1004 Patrick LaFerriere Excel Programming 0 October 5th 05 04:01 PM
Create button code stops working Stuart[_21_] Excel Programming 5 May 1st 05 09:18 PM


All times are GMT +1. The time now is 01:54 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"