Hello everyone,
I have this macro recording:
Sub CondFormat_F5_P48()
'
' CondFormat_F5_P48 Macro
'
'
Range("B1").Select
Windows("PERSONAL.XLSB").Activate
Range("F5:P48").Select
Selection.Copy
Windows("Stats 1999.xlsx").Activate
Range("F5").Select
Selection.PasteSpecial Paste:=xlPasteFormats, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False
Range("H48,J48,L48,N48,P48").Select
Range("P48").Activate
Selection.NumberFormat = "-#"
Range("B1").Select
End Sub
Everytime I want to use it, I have to change the specific sheet name (in this case "Stats 1999") into whatever sheet name I'm using.
So, how can I make it work with whatever sheet is active at the moment?
Thanks!
I have this macro recording:
Sub CondFormat_F5_P48()
'
' CondFormat_F5_P48 Macro
'
'
Range("B1").Select
Windows("PERSONAL.XLSB").Activate
Range("F5:P48").Select
Selection.Copy
Windows("Stats 1999.xlsx").Activate
Range("F5").Select
Selection.PasteSpecial Paste:=xlPasteFormats, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False
Range("H48,J48,L48,N48,P48").Select
Range("P48").Activate
Selection.NumberFormat = "-#"
Range("B1").Select
End Sub
Everytime I want to use it, I have to change the specific sheet name (in this case "Stats 1999") into whatever sheet name I'm using.
So, how can I make it work with whatever sheet is active at the moment?
Thanks!