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: 14
Default [Q] For, Next - How to Speed Up

Looking for tips to speed up a loop that writes a value to a range of
cells given the value of related cells.

Details:
I have two ranges---both contain one column and same number of rows
(10). Each of the 3 cells is either TRUE or FALSE. The second range
has 3 cells. VBA writes a value to the second range for each cell
where TRUE in the first named range.

Code:

Dim i As Integer

For i = 1 To 3
If wsMenu.Range("rngChkRef" & i) Then
wsMenu.Range("vbChkRefStatus" & i) = "OK"
End if

Next i


Given:
A1 TRUE
A2 FALSE
A3 TRUE

Loop result:
B1 (vba writes OK)
B2
B3 (vba writes OK)

Is there any way to speed this up? Tried ScreenUpdating and
calculation but the loop writes are noticeable (ie, template contains
more than 3 cells). I'm thinking an array would be fast but not sure
how to write it. Any help is appreciated!

 
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
Speed it up? Ray Excel Programming 4 July 31st 09 04:32 PM
Speed MikeH2 Excel Programming 1 February 18th 08 04:52 PM
Speed this up for me, please Adrian D. Bailey Excel Programming 1 December 21st 06 12:52 AM
Is there any way to speed this up? Keith74 Excel Programming 5 December 15th 06 01:32 PM
Can you speed UP drag speed? Ryan W Excel Discussion (Misc queries) 1 October 24th 05 06:09 PM


All times are GMT +1. The time now is 12:08 AM.

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

About Us

"It's about Microsoft Excel"