why is answer rounded up?

J

JTGRUD

i am creating a time sheet to track hours worked in a week and the pay due
for those hours worked. each day has 4 cells to enter in-out-in-out times.
the times are entered as, i.e. "8:30 am" and formatted as Time. i use the
equation, =((firstoutcell-firstincell)+(secondoutcell-secondincell))*24 to
correctly get a daily total in hours (formatted as Number to two decimal
places). i then use the SUM function to correctly total up the 5 days hours
(as Number to two decimals). but when i multiply the cell containing the
weekly hours total times the hourly wage, instead of getting the exact dollar
amount, i get a rounded up amount. i am using the correct amount of decimal
places in the answer and the cell is big enough. any answers out there?
 
J

JoeU2004

JTGRUD said:
i use the
equation, =((firstoutcell-firstincell)+(secondoutcell-secondincell))*24
to
correctly get a daily total in hours (formatted as Number to two decimal
places). i then use the SUM function to correctly total up the 5 days
hours
(as Number to two decimals). but when i multiply the cell containing the
weekly hours total times the hourly wage, instead of getting the exact
dollar
amount, i get a rounded up amount. i am using the correct amount of
decimal
places in the answer

Unless you set the calculation option "Precision as displayed" (Tools >
Options > Calculcation), which I do not recommend, the number of decimal
places in the format affects how a value is displayed, but it does not
change the underlying value.

If you want the rounded numbers to be used in subsequent computation, you
must use the ROUND function (or the "Precision as displayed" option). For
example:

=round((A2-A1 + B2-B1)*24,2)

=round(sum(C1:C2)*D1,2)


----- original message -----
 

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