ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Have payroll sheet and having trouble subtracting 1AM from 5PM (https://www.excelbanter.com/excel-worksheet-functions/91954-have-payroll-sheet-having-trouble-subtracting-1am-5pm.html)

Tammy

Have payroll sheet and having trouble subtracting 1AM from 5PM
 


Chip Pearson

Have payroll sheet and having trouble subtracting 1AM from 5PM
 
Try a formula like

=A1-B1+(A1<B1)

Where A1 is the end time and B1 is the start time. The +(A1<B1)
part of the formula will add 1 day if the end time is earlier
than the start time.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com


"Tammy" wrote in message
...





All times are GMT +1. The time now is 03:40 AM.

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