跳到主要内容

如何计算(识别)并更改Excel中的小数位?

本文将向您展示计数和识别数字小数位的方法,以及更改给定范围或整个工作表中小数位的方法。

假设我们将计算和更改给定列A中数字的小数位,请参见以下屏幕截图:

文档计数更改小数位 1

计算并确定数字的小数位

在给定范围内更改小数位

更改整个工作表中的小数位

使用 Kutools for Excel 在特定位置添加小数点好主意3


箭头蓝色右气泡 计算并确定数字的小数位

有时有些数字包含各种小数位数,您可能需要对数字进行计数并显示在单元格中。 您可以按照以下步骤进行操作:

在空白单元格(即单元格B2)中,输入公式 =IF(A2=INT(A2),0,LEN(MID(A2-INT(A2),FIND(".",A2,1),LEN(A2)-FIND(".",A2,1)))),然后按 输入 键。文档计数更改小数位 2

然后,它返回单元格B2中的小数位。 在这种情况下,它显示为5。现在,通过将此公式复制并粘贴到相应的单元格中,您可以得到其他数字的小数位。


箭头蓝色右气泡 在给定范围内更改小数位

您可以通过以下步骤更改给定范围内许多数字的小数位:

步骤1:选择要更改其小数位的数字。 在这种情况下,请选择A2:A6的范围。

步骤2:点击 减少小数 按钮或 增加小数 按钮在 联系电话 组下 主页 标签。
文档计数更改小数位 3

步骤3:然后将所选内容中的数字的小数位更改并统一为相同的小数位。 请参见以下屏幕截图:

文档计数更改小数位 4文档合并多个工作簿arrow2文档计数更改小数位 5

您还可以使用以下命令更改和统一数字的小数位 单元格格式 通过右键单击选择。

步骤1:选择要更改的范围,然后单击鼠标右键。

步骤2:选择 单元格格式 从上下文菜单中,然后在 单元格格式 对话框,单击 联系电话 来自 产品分类 列表,然后输入所需的小数位数。 看截图:

文档计数更改小数位 6

步骤3:然后点击 OK。 和小数位已更改为所需。

文档计数更改小数位 7文档合并多个工作簿arrow2文档计数更改小数位 8


箭头蓝色右气泡 在给定范围内更改小数位

此方法将帮助您更改整个工作表的默认小数位。

步骤1:点击 文件 > 附加选项 在Excel 2010中; 然后点击 办公按钮 > Excel选项 在Excel 2007中;

步骤2: Excel选项 对话框中,单击 高级 左栏中的按钮。

步骤3:进入 编辑 选项部分。

步骤4:检查 自动插入小数点 选项,然后在 地方 框。

步骤5:点击 OK 确认并保存更改。 现在,默认的小数位已更改。

步骤6:如果您输入的数字是1234,则默认的小数位是12.34,它将自动变为2。

文档计数更改小数位 9

顺便说一句,如果输入数字16.25893,它将显示为16.25893,而不是16.26。


箭头蓝色右气泡 使用 Kutools for Excel 在特定位置添加小数点

如果您有一个值列表,现在想在特定位置添加小数点,例如,将小数点放在每个值的第二个字符之后,如下图所示,如何在Excel中快速解决呢?

文档1

Kutools for Excel, 与超过 300 方便的功能,使您的工作更加轻松。 

Kutools for Excel,您可以将任意字符添加到列表中字符串的任何位置 添加文本 效用。

免费安装 Kutools for Excel,请执行以下操作:

1.选择要在同一位置添加小数点的值,然后单击 库工具 > 文本 > 添加文本。 看截图:
文档2

2.然后 添加文本 对话框中,将小数点键入 文本 框,然后检查 指定 选项,然后键入要在其后添加文本的位置,这里我要在第二个字符后添加小数点,您可以在右窗格中查看结果。 看截图:
文档3

3。 点击 Ok or 使用,则小数点已添加到每个值的特定位置。

添加文本 实用程序,您也可以一次将特定字符添加到字符串的多个特定位置。
文档4


箭头蓝色右气泡 将特定的字符/字符串添加到单元格

最佳办公生产力工具

🤖 Kutools 人工智能助手:基于以下内容彻底改变数据分析: 智能执行   |  生成代码  |  创建自定义公式  |  分析数据并生成图表  |  调用 Kutools 函数...
热门特色: 查找、突出显示或识别重复项   |  删除空白行   |  合并列或单元格而不丢失数据   |   不使用公式进行四舍五入 ...
超级查询: 多条件VLookup    多值VLookup  |   跨多个工作表的 VLookup   |   模糊查询 ....
高级下拉列表: 快速创建下拉列表   |  依赖下拉列表   |  多选下拉列表 ....
列管理器: 添加特定数量的列  |  移动列  |  切换隐藏列的可见性状态  |  比较范围和列 ...
特色功能: 网格焦点   |  设计图   |   大方程式酒吧    工作簿和工作表管理器   |  资源库 (自动文本)   |  日期选择器   |  合并工作表   |  加密/解密单元格    按列表发送电子邮件   |  超级筛选   |   特殊过滤器 (过滤粗体/斜体/删除线...)...
前 15 个工具集12 文本 工具 (添加文本, 删除字符,...)   |   50+ 图表 类型 (甘特图,...)   |   40+ 实用 公式 (根据生日计算年龄,...)   |   19 插入 工具 (插入二维码, 从路径插入图片,...)   |   12 转化 工具 (小写金额转大写, 货币兑换,...)   |   7 合并与拆分 工具 (高级组合行, 分裂细胞,...)   |   ... 和更多

使用 Kutools for Excel 增强您的 Excel 技能,体验前所未有的效率。 Kutools for Excel 提供了 300 多种高级功能来提高生产力并节省时间。  单击此处获取您最需要的功能...

产品描述


Office Tab 为 Office 带来选项卡式界面,让您的工作更加轻松

  • 在Word,Excel,PowerPoint中启用选项卡式编辑和阅读,发布者,Access,Visio和Project。
  • 在同一窗口的新选项卡中而不是在新窗口中打开并创建多个文档。
  • 每天将您的工作效率提高50%,并减少数百次鼠标单击!
Comments (7)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
I have a cell that already contains a long formula, but can generate results from 0.01 up to 10000.Ideally would like a way of formatting the cell such that it automatically adjusts the decimal point based upon the results.e.g.numbers < 100 would have 2 d.p.numbers <1000 would have 1 d.p.numbers >=1000 would have 0 d.p.
Can see how to achieve this using rounding function with multiple IF commands, however with the length of formula this is unmanagable:e.g.=ROUND("FORMULA",(IF("FORMULA">=1000,0,(IF("FORMULA">=100,1,2)))))
Is there a tool or function within Excel that can achieve this?If not is there a way of doing this without having to repeat the formula in the IF functions?
Ideally don't want to put VBA into the workbook or spread the calculation across multiple cells.
This comment was minimized by the moderator on the site
This only works for two digit numbers, middle of the mid function should always be 3 since when you take the decimal part the numbers will always start in the third place. Lame that I have to correct this.
This comment was minimized by the moderator on the site
How can you change the decimal place for values that are already in the cell? In other words, i'm not trying to change the number of decimal place showing, but want to convert the value of the number in the cell. To illustrate: Change 1.25 (cell a) to 125 (cell b). Is this possible without having to go through each cell to convert? Thanks!
This comment was minimized by the moderator on the site
Run an equation in the adjacent column =A1*100, clicking bottom right corner of the box/dragging, to run down the length of the column.
This comment was minimized by the moderator on the site
The formula for counting the number of decimal places is flawed. For example, 123.75 returns 1.
This comment was minimized by the moderator on the site
this formula works.. please try this.. =LEN(MID(A1,1+FIND(".",A1),99))
This comment was minimized by the moderator on the site
Kindly tell me if it is possible to add values with their decimal values separately ie 47.6+49.5=96.11. Does excel have a formula to deal with this one. If anybody knows, It would help me so much. Thanks. Robbie
There are no comments posted here yet
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations