Split & Convert Shift Time into TimeValue

GomaPile

Active Member
Joined
Jul 24, 2006
Messages
334
Office Version
  1. 365
Platform
  1. Windows
Hi all,

Can someone please help...


If possible, I would like to avoid using extra cells to convert a Shift Time displayed in a single A1 cell for a Roster. Is there a way to split & convert the shift time 0630-1500 ED1 and ignoring 'ED1' letters at the end. It will help me to use this formula =MOD(B1-C1,1)*24 to return 8.5

Cell A1 has 0630-1500 ED1 'original info'

...like to see Cell B1 06:30 the LEFT converted into TimeValue (without '-1500 ED1')

...like to see Cell C1 15:00 the MID converted into TimeValue (without '0630 & ED1')


Regards
NASA (GomaPile)
 

Excel Facts

Get help while writing formula
Click the italics "fx" icon to the left of the formula bar to open the Functions Arguments dialog. Help is displayed for each argument.
If the data remains constant then...

B1;

Code:
=TIMEVALUE(LEFT(A1,2)&":"&MID(A1,3,2))

C1;

Code:
=TIMEVALUE(MID(A1,6,2)&":"&MID(A1,8,2))
 
Upvote 0
Hey JazzSP8,

Awesome job; thank you so much. It works perfectly!!. And yes it's constant, as we have many other cells referencing in the same way, with different shift times. This will also help with my userform too.

Thanks heaps

If the data remains constant then...

B1;

Code:
=TIMEVALUE(LEFT(A1,2)&":"&MID(A1,3,2))

C1;

Code:
=TIMEVALUE(MID(A1,6,2)&":"&MID(A1,8,2))
 
Last edited:
Upvote 0

Forum statistics

Threads
1,224,820
Messages
6,181,162
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