English 中文(简体)
Excel decimal Rounding?
原标题:Excel decimal Rounding?

我怎么能够打上几轮车,例如进行包装,以便实际数字变化,而不仅仅是出现在囚室。

例如,如果我在囚室里有229.7295999998人,而我安排牢房,只显示4个精度的地方,现在该囚室有229.7296人,但囚室的价值仍为229.7295999999999998。 因此,如果我做任何计算,就会使用较长的奇数,而不是4个奇数。

难道我可以这样作,不仅在囚室露面显示4个小数点,而且使囚室的实际价值反映4个小数,以便牢房和公式线的价值显示229.7296,而不是229.7295999998。

I know I can probably use a function or formula in an adjacent cell to round the number but I just put together a huge spread sheet and it would take a really long time if I had to do the same thing for all the cells in my spread sheet. Any ideas?

最佳回答

我认为的两种方式是:

  • if it is a one off: create a new tab where each cell is calculated based on the original sheet, for example in cell A1: =ROUND(OriginalTab!A1,4) etc. Then copy paste special values back to the original sheet.
  • to run a vba macro that would round each cell on your sheet to 4 decimal places.
问题回答

仅将数字复制成单册,并作为新的特别志愿人员予以节省。 然后关闭特别安全局,重新开放,数字四舍五入......

还有另一种选择:使用精炼作为显示的设定(在计算选择中)。

From excel help

Permanently changes stored values in cells from full precision (15 digits) to whatever format, including decimal places, is displayed.

可以用一种公式来权衡数字,使你能够改变奇迹,而不是所有线索。

I prefer the alternate method but I will show both

First take the value (input or formula) subtract the int and multiply by 100. This will make the decimal value an integer. Use MROUND to round. Now divide this by 100 and add back the original integer.

Example: =((MROUND(((K7-J8)-INT(K7-J8))*100,10))/100)+INT(K7-J8) if the value was 229.729599999998 the new value 229.700000000000

The alternate method Depending on the number of places you want for the decimal. MOD(value,1) which gives you the decimal portion * by 100 for two places 1000 for 3 places 10000 for 4 places etc. MROUND That then divide by the same number you multiplied above Ex. 1000 for 3 places and finally add it back to the integer or value.

Ex. =(MROUND(INT(MOD(U9,1)*1000),10))/1000+INT(U9) This would make the number 229.730





相关问题
import of excel in SQL imports NULL lines

I have a stored procedure that imports differently formatted workbooks into a database table, does work on them then drops the table. Here is the populating query. SELECT IDENTITY(INT,1,1) AS ID ...

Connecting to Oracle 10g with ODBC from Excel VBA

The following code works. the connection opens fine but recordset.recordCount always returns -1 when there is data in the table. ANd If I try to call any methods/properties on recordset it crashes ...

Excel date to Unix timestamp

Does anyone know how to convert an Excel date to a correct Unix timestamp?

C# GemBox Excel Import Error

I am trying to import an excel file into a data table using GemBox and I keep getting this error: Invalid data value when extracting to DataTable at SourceRowIndex: 1, and SourceColumnIndex: 1. As ...

Importing from excel "applications" using SSIS

I am looking for any tips or resources on importing from excel into a SQL database, but specifically when the information is NOT in column and row format. I am currently doing some pre-development ...

热门标签