# Hours Worked (again)

#### jPaulB

##### New member
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
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
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