Rounding in functions

  • Thread starter Thread starter Warren
  • Start date Start date
W

Warren

I have created a payroll fee calculation worksheet and am
having a problem with the rounding.
EX:20 employees W-2's at $1.50 per and a One time $5.00
Fee. I want to spread the cost to the client out over 2
weeks. 20 X 1.50= $30.00 + $5.00 = $35.00 / 52wks =
0.673076923076923076923076923076923. If I round to .67 the
total is only $34.84 not $35.00. How/What do I need to do
to calculate the true amount of $35.00. Please keep in
mind that other clients will have a different number of
employees so the variences will differ.

Thank you,
Stumped
 
For these types of calculations I always adhere to
following principle:

compute the cumulative for period n
deduct the cumulative for period n-1
=charge for period n

Week30 = Round(TotalCost*30/52,2)-Round(TotalCost*29/52,2)


keepITcool

< email : keepitcool chello nl (with @ and .) >
< homepage: http://members.chello.nl/keepitcool >
 
Back
Top