Well, just tried out and it works.
I have two codes as the name indicate.
Run the first code on any active sheet as long as your cursor is on that sheet when you run the code.
Sub Activeshhetonly()
Dim formatcel As Range
Application.ScreenUpdating = False
For Each formatcel In Range("n2", Range("n" & Rows.Count).End(xlUp))
formatcel = Format(formatcel, "#H ## \M")
Next
Application.ScreenUpdating = True
End Sub
'this code only works with sheet Mileage & Pay
Sub Mileagesheetonly()
Dim formatcel As Range
Application.ScreenUpdating = False
with sheets("Mileage & Pay")
For Each formatcel In .Range("n2", .Range("n" & .Rows.Count).End(xlUp))
formatcel = Format(formatcel, "#H ## \M")
Next
Application.ScreenUpdating = True
end with
End Sub
Bookmarks