Hours Worked (again)

jPaulB

New member
Joined
Sep 26, 2013
Messages
7
Reaction score
0
Points
1
Location
Moncton, NB, Canada
Excel Version(s)
Microsoft Office 2019
Hi Folks,

bgoree09 was good enough to provide this formula to calculate hours worked less a consistent 30 minute lunch break:

=(IF(B2>B3,1+(B3-B2),B3-B2)-(B4/60/24))*24

B4 represents a calculated span of time.

My issue is that B4 will be a consistent 30 minutes... but when I copy the formula to a range of other cells, Excel modify B4 to B5 and so on.

How could I change this formula to at least appear like this?

=(IF(B2>B3,1+(B3-B2),B3-B2)-30 minutes

This way, the constant will remain a cionstant.

Thanks again,
Paul
 

bgoree09

New member
Joined
Aug 20, 2013
Messages
179
Reaction score
0
Points
0
Hello again,

If b4 will always be 30 minutes you can plug 30 in for b4 :: ....(30/60/24))*24

Good luck,
 

Hercules1946

New member
Joined
Mar 22, 2013
Messages
794
Reaction score
0
Points
0
Location
York, England
Excel Version(s)
2010
If your constant is never going to be updated then bgoree09 has given you the solution. If you want to use B4 as your constant, this does have the advantage that if circumstances dictate that the constant needs updating, you don't need to change any formulae that use it. Instead of entering B4 in your formula, put $B$4 and the $s stop the B and the 4 being changed if you copy the formula. Also, if you already have B4 in the formula theres a shortcut. Click on the B4 in the formula and tap the F4 key to cycle through the amendment options.

HTH

Hercules
 
Top