If you just want to keep it as a string rather than convert it to Excel time use
Slight problem with a Worksheet that I've inhereted,
All the Time values in the cells have no ":" so I'm seeing times like (All in Military time) 700 of 2200
How do I put a Colon in the string with VBA,
I know about using the LEN to see where I would need to put it.. but thats as far as I can go..
Any Advice will be to my sincearest appreciation..
VBA version of Derk's formula
Code:Sub AddColon() Dim rngTemp As Range For Each rngTemp In Selection.Cells rngTemp = Left(rngTemp, Len(rngTemp) - 2) & ":" & Right(rngTemp, 2) Next End Sub
There are currently 1 users browsing this thread. (0 members and 1 guests)