View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Chewy509 Chewy509 is offline
external usenet poster
 
Posts: 2
Default Leading characters

"Tom Ogilvy" wrote in message...
the leading ' is treated as a formatting character. Thus it isn't
considered part of the cell.

Select your cells and run this macro:

Sub replaceit()
For Each cell In Selection
cell.Value = Trim(cell.Text)
Next
End Sub

This will convert the value to time values, however - hope that is what you
want.

It only displays in the formula bar as 12:00:18 AM, if it displays in the
cell that way, just format the cell to hh:mm:ss


It won't make any difference if you are performing math on the cells. Time
is stored as the fraction of a day. So an elapsed time is day zero plus the
fraction. 6 am = 0.25 for example. Format the cell as general and you
will see what I mean.


Thanks Tom.