A
alf bryn
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
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