Subtract timevalue (hours and minutes) from clocktime accross midnight in 24 hour format

BlueDragonfly

New Member
Joined
Aug 25, 2014
Messages
1
Originally, I found a thread here that was very helpful in showing me how to subtract hours from time across midnight in a 24 hour format. However, I had a complication in how I was personally using it, in which was subtracting the decimal minutes or converting the hours (3.5) to the appropriate time.

I need to perform the following subtraction: 02:00-3.5 hours, which should give me 22:30. However, the formula below will only provide 23:00

=MOD(A1-MOD(TIME(B2,0,0),1)+1,1)
A1=02:00
B2=3.5

How do I account for decimal time like 2.5 hours when subtracting hours from time across midnight? Understanding the formulas has always been a weakness of mine and I no idea how to convert the decimals and account for it correctly across midnight. Any help is appreciated.
 

Excel Facts

Back into an answer in Excel
Use Data, What-If Analysis, Goal Seek to find the correct input cell value to reach a desired result

Forum statistics

Threads
1,225,399
Messages
6,184,751
Members
453,254
Latest member
topeb

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