ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Subtracting partial hours (https://www.excelbanter.com/excel-worksheet-functions/217720-subtracting-partial-hours.html)

Melissa F

Subtracting partial hours
 
I am trying to find the formula that will allow me to subtract partial hours
for an employee schedule (i.e. if the employee worked from 7:30am until 12pm)
what formula can I use to show 4.5 hours?

T. Valko

Subtracting partial hours
 
=(end-start)*24

A1 = 7:30 AM
B1 = 12:00 PM

=(B1-A1)*24

Format as General or Number

If the end time might span into the next day (the next day starts at 12:00
AM):

A1 = 7:30 PM
B1 = 12:00 AM

=MOD(B1-A1,1)*24

Format as General or Number

--
Biff
Microsoft Excel MVP


"Melissa F" <Melissa wrote in message
...
I am trying to find the formula that will allow me to subtract partial
hours
for an employee schedule (i.e. if the employee worked from 7:30am until
12pm)
what formula can I use to show 4.5 hours?





All times are GMT +1. The time now is 08:31 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com