跳到主要内容

如何限制Excel中公式中的小数位数?

例如,您对一个范围求和,并在Excel中获得一个具有四个小数位的和值。 您可能会想到在“设置单元格格式”对话框中将此总和值格式化为小数点后一位。 实际上,您可以直接限制公式中的小数位数。 本文讨论的是使用“格式单元格”命令限制小数位数,以及在Excel中使用“舍入”公式限制小数位数。

在Excel中使用“格式单元格”命令限制小数位数

通常,我们可以格式化单元格以轻松限制Excel中的小数位数。

1。 选择要限制小数位数的单元格。

2。 右键单击选定的单元格,然后选择 单元格格式 从右键单击菜单中。

3。 在接下来的“设置单元格格式”对话框中,转到 联系电话 标签,单击以突出显示 联系电话 ,在 产品分类 框,然后在 小数位数 框。
例如,如果您只想限制所选单元格的小数点后一位,只需键入 1小数位 框。 请参见下面的屏幕截图:

4。 点击 OK 在“设置单元格格式”对话框中。 然后,您将看到所选单元格中的所有小数位都更改为小数点后一位。

请注意: 选择单元格后,您可以点击 增加小数 按键  or 减少小数 按键  直接在 联系电话 组上 主页 选项卡更改小数位。

在Excel中轻松限制多个公式中的小数位数

一般来说,您可以使用 =Round(original_formula, num_digits) 轻松限制一个公式中的小数位数。然而,手动对多个公式进行一一修改将是相当繁琐和耗时的。在这里,使用 Kutools for Excel 的运算功能,您可以轻松限制多个公式中的小数位数!


Kutools for Excel - 使用 300 多种基本工具增强 Excel 功能。 享受全功能 30 天免费试用,无需信用卡! 立即行动吧!

限制Excel中公式中的小数位数

假设您计算一系列数字的总和,并且想要限制公式中此总和值的小数位数,那么如何在Excel中完成呢? 您应该尝试舍入功能。

Round公式的基本语法为:

= ROUND(数字,位数)

如果要将Round函数和其他公式结合使用,则应将公式语法更改为

= Round(原始格式,num_digits个)

在我们的例子中,我们希望将和值限制为小数点后一位,因此我们可以应用以下公式:

=圆(SUM(B2:B11),1)


批量限制多个公式中的小数位数

如果你有 Kutools for Excel 安装后,可以应用它 操作 功能可批量修改多个输入的公式,例如在Excel中设置舍入。 请执行以下操作:

Kutools for Excel-包括300多个用于Excel的便捷工具。 全功能30天免费试用,无需信用卡! 立即行动吧!

1。 选择您需要限制其小数位数的公式单元格,然后单击 库工具 > 更多 > 操作.

2。 在“操作工具”对话框中,请单击以突出显示 四舍五入 ,在 操作 列表框,在 操作数 部分,然后检查 创建公式 选项。

3。 点击 Ok 按钮。

现在,您将看到所有公式单元格都将四舍五入到指定的小数位。 看截图:

Tips::如果需要批量舍入或舍入多个公式单元格,则可以进行以下设置:在“操作工具”对话框中, (1) 选择 定制版 在“操作”列表框中, (2) 类型 = ROUNDUP(?, 2) or = ROUNDDOWN(?, 2) ,在 定制版 部分,和 (3) 检查 创建公式 选项。 看截图:


在Excel中轻松限制多个公式中的小数位数

通常,“小数”功能可以减少单元格中的小数位,但是在公式栏中显示的实际值完全不变。 Kutools for Excel圆形 实用程序可以帮助您轻松地将值向上/向下/四舍五入到指定的小数位。

Kutools for Excel-包括300多个用于Excel的便捷工具。 全功能60天免费试用,无需信用卡! 立即行动吧!

此方法会将公式单元格四舍五入到指定的小数位数。 但是,它将从这些公式单元格中删除公式,并且仅保留舍入结果。


演示:Excel中公式中小数位数的限制

Kutools for Excel:超过 300 个方便的工具触手可及! 立即开始 30 天免费试用,没有任何功能限制。 立即下载!

相关文章:

最佳办公生产力工具

🤖 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 (15)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
this cnu
am using excel fo milk calculations

in 1 crate having 12/lit of milk.
if customar take 12/lit in total it shows 1 using,(=number1/number2)
if customar take 24/ in total it shows 2 using,(=number1/number2)
if customar take 36/ total it shows 3using,(=number1/number2)
but some customar take 15 or 22 or 35

if customar take 15 in total it shows 1.3
if customar take 22 in total it shows 1.10
if customar take35 in total it shows 2.11

i need formula for above calculation
This comment was minimized by the moderator on the site
try this:
=roundup(number1/number2,0)
This comment was minimized by the moderator on the site
'95,954,691.3389700060
When a put this data on excel, and quit the ' to turn it a number, excel, trucante the number after 5 decimal. The new number is 95,954,691.33897, but I need 10 decimals. How to resolve this?
This comment was minimized by the moderator on the site
Try this:

=TEXT(95954691.3389100060,"00,000,000.0000000000")
This comment was minimized by the moderator on the site
Ok, here is one I really need help with since it would ease my job a lot. I have a table where i need most of my cells to have 2 decimals. One of the columns (lets say C) has to be A multiplied by B, but with a little text following the result of the multiplication, hence i gave it a:
A*B & "text" formula
My problem is that if result of A*B is 3 or 3.1 it will appear just like that: "3 text" or "3.1 text", but i really need it as "3.00 text"/ "3.10text".
Any tips?
This comment was minimized by the moderator on the site
Try this:

=TEXT(A*B,"0.00")&" text"
This comment was minimized by the moderator on the site
I want to set a limit whereas 0.60 is the threshold if the decimal reaches 0.60 it will automatically count as 1 and reset into decimal. The decimal represent the minutes and the whole number represent the hours. I'm presenting my data as numbers instead of timevalue. Hope anyone can help
This comment was minimized by the moderator on the site
Unfortunately it is not working if you concatenate:

I want to combine two cells A and B with many digits to A (B) with onlytwo digits.

I tried like that:
=CONCATENATE((ROUND(C4,1))," (",(Round(D4,1)),")")

It doesn't work and shows only the formula.
Can anyone help?
This comment was minimized by the moderator on the site
Hi yvonne Fabian,
Your formula works well in my Excel 2016.
This comment was minimized by the moderator on the site
how to deal with two decimal points e.g. 138.4622.472, 137.1416.113 etc. any way to get rid of .472 and .113 and so on
This comment was minimized by the moderator on the site
John, to round to 0 decimals, try use ROUND(CELL,0) and to round DOWN to the number, use INT (integer).
ROUND(12.5,0) = 13 ; INT(12.5) = 12
for the same but not to whole number but e.g. tenths, first multiply the baste number by 10, then ROUND/INT and then devide back by ten.
This comment was minimized by the moderator on the site
Here we are inserting the values in one cell(A1) and applying the formula in another cell(D1) (for example) and in that cell(D1) only we are getting the output , but I want to apply the formula in cell(A1) only so I can get the output in that cell (A1).
If I am doing this then I am not getting any output in the cell (A1).
Please help me to achieve this.
This comment was minimized by the moderator on the site
Hi Narsingh,
Kutools for Excel provides an Operation tools which can custom formula to selected cells. This feature may solve your problem.
This comment was minimized by the moderator on the site
Here we are inserting the values in one cell(A1) and applying the formula in another cell(D1) (for example) and in that cell(D1) only we are getting the output , but I want to apply the formula in cell(A1) only so I can get the output in that cell (A1).
If I am doing this then I am not getting any output in the cell (A1).
Please help me to achieve this.
This comment was minimized by the moderator on the site
thanks, this soo helpfull :-)
There are no comments posted here yet
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations