Hello eveybody,
I'm looking to create a VBA button that'll quickly allow me to change the units of a duration variable. I have been able to write the code and get it to run smoothly, however when the number rows in the column changes (e.g. theres a new set of data i need to change the units for. For example 6 sets of data instead of 20) the code tries to divide multiple columns by 60.
Sub Change_Duration_Unit()
'
' Change_Duration_Unit Macro
'
Range("T5").Select
Selection.Copy
Range("G8").Select
Range(Selection, Selection.End(xlDown)).Select
Selection.PasteSpecial Paste:=xlPasteAll, Operation:=xlDivide, SkipBlanks _
:=False, Transpose:=False ****** this is the line of script that is highlighted as the error
Application.CutCopyMode = False
Selection.NumberFormat = "0.00"
Range("G8").Select
End Sub
Thanks for your help in advance,
Cheers,
Stan
Bookmarks