LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default a faster method in changing cell value?

to re-size the range

Range("A1").Resize(10,2)

then refers to A1:B10

as an example.

--
Regards,
Tom Ogilvy


"Nick" wrote in message
...
Hi,

After adding Application.ScreenUpdating + Application.Calculation,
performance is better, thanks!

But, it might be silly, what is the exact function of ReSize method?

Nick

Tom Ogilvy wrote:

Sub Tester1()
Dim varr() As String
Dim i As Long, j As Long

ReDim varr(0 To 5000, 0 To 20)
For i = 0 To 5000
For j = 0 To 20
varr(i, j) = i & j 'not static!
Next
Next
Application.ScreenUpdating = False
Application.Calculation = xlManual
Range("A1").Resize(50001, 21).Value = varr
Application.Calculation = xlAutomatic
Application.ScreenUpdating = True
End Sub


took about 20 seconds for me, but most of the time was spend writing to

the
worksheet. Building the array was almost instantaneous.



 
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
Which method is faster matpoh Excel Discussion (Misc queries) 2 October 21st 05 03:12 PM
Can faster CPU+larger/faster RAM significantly speed up recalulati jmk_li Excel Discussion (Misc queries) 2 September 28th 05 10:24 AM
Changing filenames using theSaveAsCopy method davidoo2005 Excel Programming 1 July 10th 04 08:13 AM
Which method is faster? Layman Excel Programming 1 February 27th 04 05:22 PM
Changing Calculation Method Simon Palmer Excel Programming 2 November 26th 03 06:01 PM


All times are GMT +1. The time now is 06:37 PM.

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"