Home |
Search |
Today's Posts |
#4
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Thank you Socratis - SUPER
"Socratis" wrote: Wanna, another solution is to create this macro in a module. Public Sub FormatTime() Dim rng As range Dim cell As range Set rng = Selection For Each cell In rng If Left(cell.Value, 1) = ":" Then cell.Value = "0" & cell.Value End If Next End Sub To make things easier, assign this macro to a shortcut, such as ctrl+g. Thus, to use daily just highlight your range and press ctrl+g. "Wanna Learn" wrote: Hello everyday I import data that looks like this ACD Time 8:52:40 :20:26 3:46:45 :00:00 1:17:52 3:27:37 Here is the problem if the cell is over an hour , example 8:52:40 the cell is formatted as time, but if the cell is less than an hour example, :20:20 is formatted as general. However if I add a zero in front of the number (e.g. 0:20:26)then it becomes formatted as time. I've have tried several formats to change this but it does not work. The only way is if I change it manually . On a daily basis I have over 50 that I have to add the zero to . How can I speed this up. thanks |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Formatting on imported data (Excel 2003) | Excel Discussion (Misc queries) | |||
Formatting imported data | Excel Worksheet Functions | |||
Formatting web imported data correctly | Excel Worksheet Functions | |||
convert time imported as text to time format for calculations | Excel Worksheet Functions | |||
problem working with time data imported from text file | Excel Worksheet Functions |