A
Amedee Van Gasse
Excel 2007.
I found a bottleneck in my code, in this part:
r = shDAT.UsedRange.Rows.Count
For i = 2 To r
shDAT.Cells(i, 4).FormulaArray = _
"=MAX(IF(R2C1:R" & r & "C1=RC1,R2C2:R" & r &
"C2,FALSE))"
Application.StatusBar = Format(i / r, "0.0%") '
Added to see the progress
Next
Currently the value of r is 13693.
Screenupdating & calculation are already disabled.
I know from literature that extensive use of array formulas can slow
down a sheet, and now I experienced it first hand.
What suggestions or strategies do you suggest to speed this up? I
suppose that a rewrite of the logic of this part is needed?
I found a bottleneck in my code, in this part:
r = shDAT.UsedRange.Rows.Count
For i = 2 To r
shDAT.Cells(i, 4).FormulaArray = _
"=MAX(IF(R2C1:R" & r & "C1=RC1,R2C2:R" & r &
"C2,FALSE))"
Application.StatusBar = Format(i / r, "0.0%") '
Added to see the progress
Next
Currently the value of r is 13693.
Screenupdating & calculation are already disabled.
I know from literature that extensive use of array formulas can slow
down a sheet, and now I experienced it first hand.
What suggestions or strategies do you suggest to speed this up? I
suppose that a rewrite of the logic of this part is needed?