小飞机要飞高 發表於 2024-9-19 00:00:00

设置小数位数后为什么得到的值与计算的值不一致

<p style="text-wrap-mode: wrap;"><span style="font-size: 16px;">在制作财务报表的时候,经常需要设置单元格小数点(例如:只显示2位小数);这个时候对这些数字进行求和,就会遇到求和结果和手工计算不一致的。</span></p><p style="text-wrap-mode: wrap;"><span style="color: rgb(89, 89, 89); font-size: 16px;">例如以下示例:人工成本(实际值 10000.234,显示值 10000.23)、材料成本(实际值 5000.523,显示值 5000.52)、其他费用(3000.243,显示值 3000.24);人工按显示值求合计,得到结果是18000.99;表格按实际值求合计,得到结果是18001.00。</span></p><p style="text-wrap-mode: wrap;"><span style="font-size: 16px;"><img src="https://res1.wpsacdm.cache.wpscdn.cn/images/210a12494e60de8861234af4bb32a58d.png" title="image.png" alt="image.png"></span></p><p style="text-wrap-mode: wrap;"><span style="font-size: 16px;">为了保证表格计算结果和手工计算一致,可以</span><strong style="font-size: 16px;">开启</strong><span style="font-size: 16px; background-color: rgb(255, 255, 0); color: rgb(0, 0, 0);"><strong>“以显示精度为准”</strong></span><span style="font-size: 16px;">或者</span><strong style="font-size: 16px;">在数据处理过程中</strong><span style="font-size: 16px; background-color: rgb(255, 255, 0); color: rgb(0, 0, 0);"><strong>加入ROUND函数</strong></span><span style="font-size: 16px;">,这样表格自动计算出的结果,也是 18000.99。具体操作步骤如下:</span></p><ul class=" list-paddingleft-2" style="width: 1034.23px; text-wrap-mode: wrap;"><li><p><strong style="font-size: 16px;">开启“以显示精度为准”:</strong><span style="font-size: 16px;">对单元格</span><span style="font-size: 16px;">数值进行计算时,取单元格设置数字格式之后的显示值进行计算,而不是取单元格的原始值进行计算;</span></p><p><span style="font-size: 16px;">操作方法:</span><span style="font-size: 16px;">点击Excel文档左上角<strong>“文件”</strong>--&gt;<strong>“选项”</strong>--&gt;<strong>“重新计算”</strong>--&gt;勾选<strong>“以显示精度为准(P)”</strong>复选框,单击“确定”按钮,完成设置。</span></p></li></ul><p style="text-wrap-mode: wrap;"><span style="font-size: 16px; color: rgb(63, 63, 63);">&nbsp;&nbsp;</span><img src="https://res1.wpsacdm.cache.wpscdn.cn/auto/1765269366-81b7e419274b8165a43c689cb42c7e0f.png" title="image.png" alt="image.png" width="800" height="Infinity" style="width: 800px;"></p><ul class=" list-paddingleft-2" style="width: 1034.23px; text-wrap-mode: wrap;"><li><p><strong><span style="font-size: 16px;">加入ROUND函数:</span></strong><span style="color: rgb(34, 34, 38); font-family: 微软雅黑; font-size: 16px; background-color: rgb(255, 255, 255);">对要四舍五入的数字使用round函数,按指定位数进行四舍五入;</span></p><p><span style="font-size: 16px;">操作方法:如上述例子,录入显示值时替换为公式“=ROUND(实际值,2)”,即<span style="color: rgb(89, 89, 89);">人工成本显示值=ROUND(10000.234,2)、材料成本显示值=ROUND(5000.523,2)、其他费用显示值=ROUND(5000.523,2),最终求和结果为18000.99</span></span></p></li></ul><p style="text-wrap-mode: wrap;"><span style="font-size: 16px;"><span style="color: rgb(89, 89, 89);"><img src="https://res1.wpsacdm.cache.wpscdn.cn/auto/1765269366-7d497e7fadafe38848c83f42bacee449.png" title="image.png" alt="image.png"></span></span></p><p><br></p>
頁: [1]
查看完整版本: 设置小数位数后为什么得到的值与计算的值不一致