TimeValue(Substitute)

nance1432m

New Member
Joined
Aug 7, 2019
Messages
2
Hi, I am working with a spreadsheet that was pulled from an external data source. It imported the time column as text (example: 07:30m or 12:00am). No space between. I've gotten it to work if I break it into 2 separate columns using the following 2 formulas: =TIMEVALUE(SUBSTITUTE(D2,"pm"," pm")) and =TIMEVALUE(SUBSTITUTE(D2,"am"," am")). Can anyone help so that it's one formula in one column? Please :)
 

Excel Facts

Copy PDF to Excel
Select data in PDF. Paste to Microsoft Word. Copy from Word and paste to Excel.
Hi & welcome to MrExcel.
How about
=REPLACE(A2,6,," ")+0

and then format as time
 
Upvote 0
Welcome to the Board!

Try:
Code:
=TIMEVALUE(SUBSTITUTE(SUBSTITUTE(D2,"pm"," pm"),"am"," am"))
 
Upvote 0
Not sure which of us you are referring too, but glad we could help & thanks for the feedback
 
Upvote 0

Forum statistics

Threads
1,224,817
Messages
6,181,149
Members
453,021
Latest member
Justyna P

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top