I have a script that adds a colon to military time in excel.
This script takes 0600 and makes it 6:00.
Problem is for example 6:00 doesn't have a zero when it's changed in the beginning. I need it to say 06:00
I have the script, can someone fix it to say this instead?
Dim strTime As String
Set rg = Intersect(Range("G:G"), ActiveSheet.UsedRange)
For Each c In rg.Cells
If IsNumeric(c) Then
Select Case Len(c)
strTime = "00:0" & c
strTime = "00:" & c
strTime = Left(c, 1) & ":" & Right(c, 2)
strTime = Left(c, 2) & ":" & Right(c, 2)
c = strTime