ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   why is answer rounded up? (https://www.excelbanter.com/excel-discussion-misc-queries/228959-why-answer-rounded-up.html)

JTGRUD

why is answer rounded up?
 
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?



joeu2004

why is answer rounded up?
 
"JTGRUD" wrote in message
...
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 -----

"JTGRUD" wrote in message
...
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?





All times are GMT +1. The time now is 12:40 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com