Avatar of Fritz Paul
Fritz Paul
Flag for South Africa asked on

Subtract a time from a time amount in a cell using a formula in another cell.

I have a spreadsheet to calculate time worked in a week.
The daily times are added together.
Then an amount of 45 hours should be deducted from the weekly time to calculate the overtime.
I get the weekly total time (R8), but cannot create the formula to subtract 45 hours from R8 in U8.
Put differently: How do I write a formula in U8 that gives me the total time in R8 minus 45 hours?
Picture below and worksheet attached.
The example worksheet picture.Time.xlsx
Microsoft Excel

Avatar of undefined
Last Comment
Fritz Paul

8/22/2022 - Mon
Kyle Abrahams

u8 = R8 - time(45, 0, 0)
Rodney Endriga

You can use this formula in Cell U8:
=R8-TIME(45,0,0)

Open in new window


This is the normal format for the TIME function. You can also include minutes and seconds in the appropriate sections, if needed.

TIME ( hours, minutes, seconds)
ASKER CERTIFIED SOLUTION
Saurabh Singh Teotia

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
Kyle Abrahams

I stand corrected, good to know.
Experts Exchange is like having an extremely knowledgeable team sitting and waiting for your call. Couldn't do my job half as well as I do without it!
James Murphy
Fritz Paul

ASKER
Thanks. Superb.