ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Question about decimal places (https://www.excelbanter.com/excel-worksheet-functions/69910-question-about-decimal-places.html)

chrisgoulden

Question about decimal places
 

I have a worksheet function that gives me a result in a dollar value
with 2 decimals, let's say it produces the following value: $11.85.
Now, the actual value is more like this $11.85983733333 because it's a
result of a much more complex formula, but of course I have it rounded
off to 2 decimal places. I have another formula that takes the above
number and multiplies it by a number of hours, say 5000, and I get a
dollar value, BUT I want the second formula to grab the $11.85 in the
first formula and use that, but instead it grabs the long un-rounded
version. How do I get it to grab the result that I want? Am I making
sense? I can explain myself further if necessary. Thanks.


--
chrisgoulden
------------------------------------------------------------------------
chrisgoulden's Profile: http://www.excelforum.com/member.php...o&userid=31235
View this thread: http://www.excelforum.com/showthread...hreadid=509017


Arvi Laanemets

Question about decimal places
 
Hi


"chrisgoulden"
wrote in message
news:chrisgoulden.22tqmz_1139256904.2383@excelforu m-nospam.com...

I have a worksheet function that gives me a result in a dollar value
with 2 decimals, let's say it produces the following value: $11.85.
Now, the actual value is more like this $11.85983733333 because it's a
result of a much more complex formula, but of course I have it rounded
off to 2 decimal places. I have another formula that takes the above


How you did it? Rounded using ROUND(), set 'Precision as displayed' from
ToolsOptionsCalculations to be checked for a while, or simply formatted
cell as number with 2 decimals. When latter, then formatting affects only
the way, the cell value is displayed, not the value itself.


Arvi Laanemets



Pete

Question about decimal places
 
In the cell that produces $11.85983733333 by some formula, you should
modify this to:

=ROUND(your_formula,2),

although I would have thought this would produce $11.86 - if you really
want $11.85, use:

=ROUNDDOWN(your_formula,2), or
=INT(your_formula*100)/100

Hope this helps.

Pete


chrisgoulden

Question about decimal places
 

Pete.........Thank you.........this works great!!!!!!! My boss will be
so happy!!!!!!!!!!!!!!!


--
chrisgoulden
------------------------------------------------------------------------
chrisgoulden's Profile: http://www.excelforum.com/member.php...o&userid=31235
View this thread: http://www.excelforum.com/showthread...hreadid=509017


Pete

Question about decimal places
 
Hi Chris,

thanks for feeding back, glad it worked for you.

Pete



All times are GMT +1. The time now is 11:29 PM.

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