FLOOR FUNCTION

  • Thread starter Thread starter Confused
  • Start date Start date
C

Confused

I am trying to use a floor function to calculate overtime. For every 8 hours
worked, our employees get paid .5 of OT. The floor function works up until
136 hours. Any ideas how to fix this. In other words, =floor(136,8), I
would expect it to be 128, but it is 136. HELP
Becky
 
Yes, you are indeed confused, Becky.
128 and 136 are both multiples of 8, so 136 is the correct answer.
128+8=136. Why would you expect the answer to be 128?

Just as =floor(8,8) gives 8, and =floor(128,8) gives 128, =floor(136,8)
gives 136.
Any time that the first argument (number) of the FLOOR function is an exact
multiple of the second argument (significance), the output is exactly that
first argument (number).
 
Check out help on FLOOR....Rounds number down, toward zero, to the nearest
multiple of significance.

'For .5 hours for every 8 hours worked..would be....
=INT(136/8)*0.5



=floor(136,8) should return 136 only..
or try with 136 in cell A1
=floor(A1-1,8)

If this post helps click Yes
 
the function is working correct, I think you need to check your math.
136 / 8 = 17
128 + 8 = 136
 
One thought:

=floor(B5,8) might not return what you think, if B5 contains 135.999999 but
displays 136

Eric
 
Back
Top