Hello,
I’m asking for some suggestions here if you please.
I have been informed eliminating some "Select" commands may speed up VBA routines. I have numerous situations where I believe I could streamline my coding. Here are a few examples. If I can clean these up, I will work on the others.
Thanks for viewing,
Steve K.
I’m asking for some suggestions here if you please.
I have been informed eliminating some "Select" commands may speed up VBA routines. I have numerous situations where I believe I could streamline my coding. Here are a few examples. If I can clean these up, I will work on the others.
Rich (BB code):
'#1 –
Range("K8,K9,K11:K13").Select
Selection.Locked = True
Selection.FormulaHidden = False
With Selection.Interior
.Color = 15984868
.TintAndShade = 0
End With
'#2 –
If Range("K8") > 0 And Range("K9") <= 0 Then
Range("K9").Select
Selection.Locked = False
Selection.FormulaHidden = False
With Selection.Interior
.Pattern = xlNone
.TintAndShade = 0
End With
End If
'#3 –
Range("I33").Select
Selection.Copy
Range(Selection, Selection.End(xlDown)).Select
ActiveSheet.Paste
Application.CutCopyMode = False
Range("M33:M" & Range("LastDataRow").Value).ClearContents
Range("F6:F8,F10,K6:K13,F15:F17,F22").ClearContents
'#4 –
Range("R34").Select
Selection.Copy
Range("R34:R133").Select
ActiveSheet.Paste
Application.CutCopyMode = False
'#5 –
Range("P33:P" & Range("LastDataRow").Value).Select
Selection.ClearContents
Range("LookupFormula").Select
Selection.Copy
Range("P33").Select
Thanks for viewing,
Steve K.