Subtracting minutes in hh:mm format, and set hours

martikaih

New Member
Joined
Dec 1, 2005
Messages
2
I posted this question before:

I want to subtract a lunch time (not always an hour) and calculate overtime. I want to be able to put my lunch in the hh:mm format - 0:45 for 45 minutes, which I think I've figured out (see below). I also want to calculate overtime by subtracting a blank 8 hours from my total hours cell. How could I accomplish this?

I have all cells in the hh:mm format

I have a1=time in
b1=lunch length
c1=time out
d1=total hours [ =SUM((C1-A1)-(B1)) ]
e1=overtime
----------------------------------------------------------------
and was answered this:

Welcome to MrExcel.
Put this in E1
=MAX(D1-8,0)

Best regards,
_________________
Barrie Davidson
My Excel Web Page
--------------------------------------------------
This is not working for me. I get an error in the formula. Excel either puts a pipe after the cell reference, or deletes the comma and zero after the 8, and I get a bunch of # in the cell.
 

Excel Facts

How to fill five years of quarters?
Type 1Q-2023 in a cell. Grab the fill handle and drag down or right. After 4Q-2023, Excel will jump to 1Q-2024. Dash can be any character.

Forum statistics

Threads
1,215,793
Messages
6,126,937
Members
449,349
Latest member
Omer Lutfu Neziroglu

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