Time conversion

JoboM

New Member
Joined
May 26, 2015
Messages
40
Hi there gurus!

I'm trying to convert a general entry into a cell into a time format. The general entries are all entered as 06:00am for example. I've tried changing the formatting of the cells but as the data is pulled from a website it continually enters refreshed data as a general format.

Is there a code that will change a general entry in the cells in the range (O6:O92) from a ##:##am or ##:##pm to a time format??

Thank you kind people!

Have an excellent day!
 

Excel Facts

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.
Hi there gurus!

I'm trying to convert a general entry into a cell into a time format. The general entries are all entered as 06:00am for example. I've tried changing the formatting of the cells but as the data is pulled from a website it continually enters refreshed data as a general format.

Is there a code that will change a general entry in the cells in the range (O6:O92) from a ##:##am or ##:##pm to a time format??

Thank you kind people!

Have an excellent day!
Have you tried replacing "am and "pm" by " am" and " pm" (i.e put a space before am and pm)?
 
Upvote 0
If you can use a helper column... try
in P6
=(LEFT(O6,5)&" " &RIGHT(O6,2))+0
Change the cell format to "hh:mm am/pm"
Copy down



Hi there gurus!

Is there a code that will change a general entry in the cells in the range (O6:O92) from a ##:##am or ##:##pm to a time format??

Have an excellent day!
 
Upvote 0

Forum statistics

Threads
1,213,539
Messages
6,114,221
Members
448,554
Latest member
Gleisner2

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