I have a whole column of text-based time values that are set like this: 3:00pm, 7:45pm, 5:30pm etc. I need to convert them to recognised time-based values.
What is the best way to convert them?
I have a whole column of text-based time values that are set like this: 3:00pm, 7:45pm, 5:30pm etc. I need to convert them to recognised time-based values.
What is the best way to convert them?
A few morning samples would have been nice too, but try this...
A B 233:00pm 3:00:00 PM 247:45pm 7:45:00 PM 255:30pm 5:30:00 PM
B23=TIMEVALUE(LEFT(A23,LEN(A23)-2)&" "&RIGHT(A23,2))
copied down
1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
2. If your question is resolved, mark it SOLVED using the thread tools
3. Click on the star if you think someone helped you
Regards
Ford
A little-bit shorter
Formula:Please Login or Register to view this content.
v A B 1 3:00pm 3:00:00 PM 2 7:45pm 7:45:00 PM 3 5:30pm 5:30:00 PM 4 4:45am 4:45:00 AM
If you like my answer please click on * Add Reputation
Don't forget to mark threads as "Solved" if your problem has been resolved
"Nothing is so firmly believed as what we least know."
--Michel de Montaigne
Happy to help and thanks for the feedback
Nice 1 AlKey
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks