View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Dave Peterson Dave Peterson is offline
external usenet poster
 
Posts: 35,218
Default Convert time from text

I'd select the range to fix and then
Edit|Replace
what: P
with: (space character)PM
replace all

And the same kind of thing if you have 12:40A in cells.

And once you converted that cell to a real time, you wouldn't need another cell.

You could just check to see if the value is before or after noon (.5 of a day).

=if(a1.5,"PM",if(a1<.5,"AM","Noon"))

I'm not sure how you want to treat 12:00 Noon.

(time is a fraction of a day (12/24 = .5 = half a day)

Jim wrote:

Hello,

I copied from a pdf several lines of data, in which included the time
formated like this: 12:40P. Two questions:
1) how do I convert this text time to real time accurate to AM/PM?
2) How do I seperate out AM/PM to different cell for other use?

Thanks


--

Dave Peterson