Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 20
Default Copy, calc and repeat

all-
looking for a way to copy cells B1to I1 down 100 rows and calculate then
repeat - B101 to I101 down 100 rows and calculate until the corresponding A
column cell is blank. Perhaps a message box before moving on to the next
100?

Stated another way - If Col A is populated from A1 to A1570 (just an
example) I need to copy the formulas in B1 thru I1 to B1570 thru I1570 - in
blocks of 100 rows.

any ideas?

FYI the reason for this is the B thru I cells contain functions
referencing numerous other sheets in the workbook. The calculating after
pasting a 1000 rows at a time can take up to 2 minutes on a 2.4 P4 with 512
meg ram. This way I think I can get some results to consider while the
processing moves on to other rows.



TIA

J-


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,089
Default Copy, calc and repeat

Try this:

Sub CopyFormulae()
Dim LastRow As Long
Dim CalcStatus As Long
'Debug.Print Now() & " Start"
Application.ScreenUpdating = False
CalcStatus = Application.Calculation
Application.Calculation = xlCalculationManual
LastRow = Range("A" & Rows.Count).End(xlUp).Row
Range("B1:I1").Copy
Range("B1:I" & LastRow).PasteSpecial _
Paste:=xlPasteFormulas, _
Operation:=xlNone, _
SkipBlanks:=False, _
Transpose:=False
Application.Calculation = CalcStatus
Application.ScreenUpdating = True
'Debug.Print Now() & " End"
End Sub

It does it all in one go but it should be virtually instantaneous. At least
it is on my P4. However, my formulae were relatively simple so you could
post back with your formulae if it is slower than you might hope. Tried
with 1570 rows of data.

Regards

Trevor


"JayL" wrote in message
...
all-
looking for a way to copy cells B1to I1 down 100 rows and calculate then
repeat - B101 to I101 down 100 rows and calculate until the corresponding
A column cell is blank. Perhaps a message box before moving on to the next
100?

Stated another way - If Col A is populated from A1 to A1570 (just an
example) I need to copy the formulas in B1 thru I1 to B1570 thru I1570 -
in blocks of 100 rows.

any ideas?

FYI the reason for this is the B thru I cells contain functions
referencing numerous other sheets in the workbook. The calculating after
pasting a 1000 rows at a time can take up to 2 minutes on a 2.4 P4 with
512 meg ram. This way I think I can get some results to consider while
the processing moves on to other rows.



TIA

J-




Reply
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
Repeat copy for indifinate number of worksheets ARbitOUR[_5_] Excel Discussion (Misc queries) 3 May 5th 09 03:00 AM
Repeat Cell Formula w/out copy/paste? DTTODGG Excel Discussion (Misc queries) 1 March 13th 06 05:11 PM
Copy/Paste how to avoid the copy of formula cells w/o calc values Dennis Excel Discussion (Misc queries) 10 March 2nd 06 10:47 PM
auto calc on, but have to edit (f2) cells to force re-calc..help! Curt Excel Worksheet Functions 3 February 13th 06 06:05 PM
Select a row, copy and repeat on the next row Jason L Excel Programming 0 August 17th 04 11:13 PM


All times are GMT +1. The time now is 03:24 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"