TO ROUND 37.75 UP TO 38 OR DOWN TO 37.5 FOR PAYROLL

K

kstephens

I am trying to set up a payroll sheet and when it gets the total, I want it
to transfer to another sheet, but round off the hours. Such as if they
worked 37.75, to go up to 38hr, or if they worked 39.10 hrs it rounds down to
39.00 hrs.
 
S

Shane Devenshire

Hi,

Try

=MROUND(Sheet1!A1,1/24)

In versions of Excel prior to 2007 you need to attach the ATP - choose
Tools, Add-ins, and check Analysis ToolPak.
 
H

HARSHAWARDHAN. S .SHASTRI

Hi Kstephens,

Assuming your data starts from cell A2 , put following formula in cell B2
or relevent cell and then drag


=IF(A2-INT(A2)>0.5,INT(A2)+1,INT(A2))


H S Shastri

++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 
D

David Biddulph

Is there some good reason for not using the simpler =ROUND(A2,0) ?
Your formula gives a different result if the fraction is exactly 0.5, but I
couldn't see anything from the OP that asked for that interpretation.
 
S

Shane Devenshire

Hi,

I assumed you were not asking about a simple ROUND calculation. I may have
overworked this question. I should add that my suggestion is based on the
assumption you are using time calculations so that 37.75 is 1.5725 days
formatted time.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top