Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
precision question
I have a cell formula that works but the
cell displays it's output with 3 decimal pts precision to the right. I desire only two decimal pts to the right. How can I fix this? |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
precision question
Two possible solutions... If it is just a display issue and you don't really
care how may decimals are being carried then you can right click on the effected cell and change the formt to number and select the number of decimal points to display. The other solution is to use the round function. There is also a roundup, rounddown and trunc function. To use round in this case you would do something like... =round(A1, 2) Which yields 2 decimals of accuracy. You need to round when you are dealing with money. For example... $10.034 + 15.023 = 25.057 ...but changing the format it will look like $10.03 + 15.02 = 25.06 which definitely looks wrong... HTH "D" wrote: I have a cell formula that works but the cell displays it's output with 3 decimal pts precision to the right. I desire only two decimal pts to the right. How can I fix this? |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
precision question
If you're using VB coding then it would be:
ActiveWorkbook.Worksheets("Sheet1").Range _("A1").NumberFormat = "$#,##0.00_);[Red]($#,##0.00)" Where Sheet1 is your sheet, and subsitute A1 for your cells. If you're not using VB then just, right click on the cell. Format Cell, and use number, and then set the right precision. NOTE: If you are using code, and don't want the $ sign, just remove them it still works. Darrin Henry *** Sent via Developersdex http://www.developersdex.com *** |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
precision in solver | Excel Discussion (Misc queries) | |||
Number precision | Excel Discussion (Misc queries) | |||
Number precision | Excel Discussion (Misc queries) | |||
Precision displayed does not match precision in cell | Excel Discussion (Misc queries) | |||
precision calculation | Excel Programming |