How do I do this? Using the simple format to HH:MM:SS does not work. It doesn't do anything. I think the time might be a text string? For example, I want to change 6:07AM to 06:07:00. Any help is appreciated.
Thanks,
Replace "AM" with " AM" (sans quotes) and then format as you like.
Microsoft MVP - Excel
Entia non sunt multiplicanda sine necessitate
This did not seem to work. I have attached an example. Also, I want to ensure that this can be simple because I will be running a macro for many lines. Thanks,
If you want to do this with code then based on your sample file:
Sub Example() With Range(Cells(1, "D"), Cells(Rows.Count, "D").End(xlUp)) .NumberFormat = "hh:mm:ss" .Value = Evaluate("IF(ROW(" & .Address & "),TRIM(REPLACE(" & .Address & ",LEN(" & .Address & ")-1,0,"" "")))") End With End Sub
My Recommended Reading:
Volatility
Sumproduct & Arrays
Pivot Intro
Email from XL - VBA & Outlook VBA
Function Dictionary & Function Translations
Dynamic Named Ranges
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks