The code you have there is generally very efficient. Arrays will not help you
at all in this instance that I can see. Is this sub being called from a
change event procedure? That is the only thing I see that could cause speed
issues as you would be in a recursive call.
--
HTH...
Jim Thomlinson
"alf bryn" wrote:
> I have a maco with a number of loops in it that runs a bit slowly.
>
> Recently I read a post in this NG that said :
>
> Macros that work on the worksheet cells are slow.
> You can greatly increase speed if you set up an array of the variant type
> from you worksheet cells then use code that works with the array.
>
> As my knowledge of arrays are minute I would be gratefull for a bit of
> advice how to change my macro. Part of my original macro below.
>
> Sub cdumacro()
>
> Dim cell As Range
> Application.ScreenUpdating = False
> Application.Calculation = xlManual
>
> For Each cell In Worksheets("cdu").Range("AS56:AS102")
> If cell.Value <> "E" Then
> Range(cell.Value).Copy
> Range(cell.Offset(0, 1).Value).PasteSpecial Paste:=xlValues
> End If
> Next cell
>
>
> Alf
>
>
>
Bookmarks