Combine Formulas - Formula to type time without colons + existing time based formula

JasonP91

New Member
Joined
Dec 13, 2016
Messages
13
I recently had help creating a formula so for a work rota, so that a certain amount of time is subtracted from different lengths of hours - this post http://www.mrexcel.com/forum/excel-questions/980512-nested-if-time-functions-timesheet-rota-2.html

I'm now using this formula: =IF((C4-B4)<TIME(6,0,0),C4-B4,IF(AND((C4-B4)>=TIME(6,0,0),(C4-B4)<=TIME(7,0,0)),(C4-B4)-TIME(0,30,0),IF(AND(C4-B4>=TIME(8,0,0),C4-B4<=TIME(9,0,0)),(C4-B4)-TIME(1,0,0),IF(C4-B4>=TIME(10,0,0),(C4-B4)-TIME(1,30,0),C4-B4))))


I'm now searching for a way to input the time into the spreadsheet without colons. I came across formatting the cell to "00\:00", but that now messes with the formula used, as it's reported as text, not time now. I then came across using this formula, which re-enables the addition/subtraction of time:



TEXT(C4,"00\:00")-TEXT(B4,"00\:00")+(B4>C4)

I'm now looking for a way to merge them together, enabling me to type time without colons, and for the relevant maths to work out. Any help will be greatly appreciated.

Here is a link to the speadsheet I'm working on: https://www.dropbox.com/s/pz8ihcg53ltbgdd/Jason Rota Fuction Test dropbox.xlsm?dl=0

Thank you in advance
 

Excel Facts

Copy formula down without changing references
If you have =SUM(F2:F49) in F50; type Alt+' in F51 to copy =SUM(F2:F49) to F51, leaving the formula in edit mode. Change SUM to COUNT.

Forum statistics

Threads
1,216,434
Messages
6,130,611
Members
449,584
Latest member
c_clark

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