Lux Aeterna
Board Regular
- Joined
- Aug 27, 2015
- Messages
- 201
- Office Version
- 2019
- Platform
- Windows
Not sure if this is the right place to ask.
I've got the following macro that I run on demand on a specific sheet named "results".
In the past couple of weeks that macro runs extremely slow.
I experimented a bit and realised that the macro is slowed down by another sheet on the workbook named "stats". Once I delete the stats sheet, the macro runs fast again.
It's unexpected though because results and stats sheet aren't directly linked to each other.
There's an indirect link between them though. Results sheet is linked to List sheet (through VLOOKUP) and List sheet is linked to Stat's sheet through various formulas.
It seems that some of the adjustments I've made to the stats sheet caused the problem -no idea which- but as I said this slow down is unjustified to my mind.
Any idea how to save the day?
I've got the following macro that I run on demand on a specific sheet named "results".
VBA Code:
Sub Êáèáñéóìüò_íÝï()
'
' Êáèáñéóìüò_íÝï Macro
'
'
Range("U2:X3").Select
Selection.ClearContents
Range("AA2:AA8").Select
Selection.ClearContents
Range("M17:W18").Select
Selection.ClearContents
Range("H14:K14").Select
ActiveCell.FormulaR1C1 = "- - - - - - -"
Range("H15:K15").Select
ActiveCell.FormulaR1C1 = "- - - - - - -"
Range("H16:K16").Select
ActiveCell.FormulaR1C1 = "- - - - - - -"
Range("H17:K17").Select
ActiveCell.FormulaR1C1 = "- - - - - - -"
Range("G18").Select
Selection.ClearContents
Range("I18").Select
Selection.ClearContents
Range("K18").Select
Selection.ClearContents
Range("T14:W14").Select
ActiveCell.FormulaR1C1 = "- - - - - - -"
Range("T15:W15").Select
ActiveCell.FormulaR1C1 = "- - - - - - -"
Range("M16:W16").Select
Range("G21:J21").Select
ActiveCell.FormulaR1C1 = "- - - - - - -"
Range("G22:J22").Select
ActiveCell.FormulaR1C1 = "- - - - - - -"
Range("G23:J23").Select
ActiveCell.FormulaR1C1 = "- - - - - - -"
Range("G25:J25").Select
ActiveCell.FormulaR1C1 = "- - - - - - -"
Range("U21:X21").Select
ActiveCell.FormulaR1C1 = "- - - - - - -"
Range("U22:X22").Select
ActiveCell.FormulaR1C1 = "- - - - - - -"
Range("U23:X23").Select
ActiveCell.FormulaR1C1 = "- - - - - - -"
Range("U24:X24").Select
ActiveCell.FormulaR1C1 = "- - - - - - -"
Range("U25:X25").Select
ActiveCell.FormulaR1C1 = "- - - - - - -"
Range("U26").Select
Range("L28").Select
Selection.ClearContents
Range("W28").Select
Selection.ClearContents
Range("W30").Select
Selection.ClearContents
Range("K30").Select
Selection.ClearContents
Range("C33").Select
Selection.ClearContents
Range("C34").Select
Selection.ClearContents
Range("C35").Select
Selection.ClearContents
Range("G33:G35").Select
Selection.ClearContents
Range("V33:V34").Select
Selection.ClearContents
Range("V37").Select
Selection.ClearContents
Range("I37").Select
Selection.ClearContents
Range("D28").Select
ActiveCell.FormulaR1C1 = "×"
Range("D29").Select
Range("H40:H41").Select
Selection.ClearContents
Range("U40:U41").Select
Selection.ClearContents
Range("A46:X47").Select
Selection.ClearContents
Range("A46:X47").Select
Range("U2:X2").Select
End Sub
In the past couple of weeks that macro runs extremely slow.
I experimented a bit and realised that the macro is slowed down by another sheet on the workbook named "stats". Once I delete the stats sheet, the macro runs fast again.
It's unexpected though because results and stats sheet aren't directly linked to each other.
There's an indirect link between them though. Results sheet is linked to List sheet (through VLOOKUP) and List sheet is linked to Stat's sheet through various formulas.
It seems that some of the adjustments I've made to the stats sheet caused the problem -no idea which- but as I said this slow down is unjustified to my mind.
Any idea how to save the day?