跳到主要內容

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

例如,您對一個範圍求和,並在Excel中獲得一個具有四個小數位的和值。 您可能會想到在“設置單元格格式”對話框中將此總和值格式化為小數點後一位。 實際上,您可以直接限制公式中的小數位數。 本文討論的是使用“格式單元格”命令限制小數位數,以及在Excel中使用“舍入”公式限制小數位數。

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

通常,我們可以格式化單元格以輕鬆限制Excel中的小數位數。

1。 選擇要限制小數位數的單元格。

2。 右鍵單擊選定的單元格,然後選擇 單元格格式 從右鍵單擊菜單中。

3。 在接下來出現的“設置單元格格式”對話框中,轉到 聯繫電話 標籤,單擊以突出顯示 聯繫電話 ,在 類別 框,然後在 小數位數 框。
例如,如果您只想限制所選單元格的小數點後一位,只需鍵入 1小數位數 框。 請參見下面的屏幕截圖:

4。 點擊 OK 在“設置單元格格式”對話框中。 然後,您將看到所選單元格中的所有小數位都更改為小數點後一位。

注意: 選擇單元格後,您可以點擊 增加小數 按鍵  or 減少小數 按鍵  直接在 聯繫電話 組上 首頁 選項卡更改小數位。

在Excel中輕鬆限制多個公式中的小數位數

通常,可以使用= Round(original_formula,num_digits)來輕鬆限制一個公式中的小數位數。 但是,手動一個接一個地修改多個公式將非常繁瑣且耗時。 在這裡,使用Kutools for Excel的運算功能,您可以輕鬆地限制多個公式中的小數位數!


Excel的Kutools - 使用 300 多種基本工具增強 Excel 功能。 享受全功能 30 天免費試用,無需信用卡! 立即行動吧!

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

假設您計算一系列數字的總和,並且想要限制該總和值在公式中的小數位數,那麼如何在Excel中完成呢? 您應該嘗試舍入功能。

Round公式的基本語法為:

= ROUND(數字,位數)

如果要將Round函數和其他公式結合使用,則應將公式語法更改為

= Round(原始公式,num_digits個)

在我們的例子中,我們希望將和值限制為小數點後一位,因此我們可以應用以下公式:

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


批量限制多個公式中的小數位數

如果你有 Excel的Kutools 安裝後,可以應用它 手術 功能可批量修改多個輸入的公式,例如在Excel中設置舍入。 請執行以下操作:

Excel的Kutools-包括300多個用於Excel的便捷工具。 全功能30天免費試用,無需信用卡! 立即行動吧!

1。 選擇您需要限制其小數位數的公式單元格,然後單擊 庫工具 > 更多 > 手術.

2。 在“操作工具”對話框中,請單擊以突出顯示 四捨五入 ,在 手術 列錶框,在 操作數 部分,然後檢查 創建公式 選項。

3。 點擊 Ok 按鈕。

現在,您將看到所有公式單元格都將四捨五入到指定的小數位。 看截圖:

尖端:如果您需要捨入或舍入多個公式單元格,則可以進行以下設置:在“操作工具”對話框中, (1) 選擇 習俗 在“操作”列錶框中, (2) 類型 = ROUNDUP(?, 2) or = ROUNDDOWN(?, 2) ,在 習俗 部分,和 (3) 檢查 創建公式 選項。 看截圖:


在Excel中輕鬆限制多個公式中的小數位數

通常,“小數”功能可以減少單元格中的小數位,但是在公式欄中顯示的實際值完全不變。 Excel的Kutools圓形 實用程序可以幫助您輕鬆地將值向上/向下/四捨五入到指定的小數位。

Excel的Kutools-包括300多個用於Excel的便捷工具。 全功能60天免費試用,無需信用卡! 立即行動吧!

此方法會將公式單元格四捨五入到指定的小數位數。 但是,它將從這些公式單元格中刪除公式,並且僅保留舍入結果。


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

Excel的Kutools:超過 300 個方便的工具觸手可及! 立即開始 30 天免費試用,沒有任何功能限制。 現在就下載!

相關文章:

最佳辦公生產力工具

🤖 Kutools 人工智慧助手:基於以下內容徹底改變數據分析: 智慧執行   |  生成代碼  |  建立自訂公式  |  分析數據並產生圖表  |  呼叫 Kutools 函數...
熱門特色: 尋找、突出顯示或識別重複項   |  刪除空白行   |  合併列或儲存格而不遺失數據   |   沒有公式的回合 ...
超級查詢: 多條件VLookup    多值VLookup  |   跨多個工作表的 VLookup   |   模糊查詢 ....
高級下拉列表: 快速建立下拉列表   |  依賴下拉列表   |  多選下拉列表 ....
欄目經理: 新增特定數量的列  |  移動列  |  切換隱藏列的可見性狀態  |  比較範圍和列 ...
特色功能: 網格焦點   |  設計圖   |   大方程式酒吧    工作簿和工作表管理器   |  資源庫 (自動文字)   |  日期選擇器   |  合併工作表   |  加密/解密單元格    按清單發送電子郵件   |  超級濾鏡   |   特殊過濾器 (過濾粗體/斜體/刪除線...)...
前 15 個工具集12 文本 工具 (添加文本, 刪除字符,...)   |   50+ 圖表 類型 (甘特圖,...)   |   40+ 實用 公式 (根據生日計算年齡,...)   |   19 插入 工具 (插入二維碼, 從路徑插入圖片,...)   |   12 轉化 工具 (數字到單詞, 貨幣兌換,...)   |   7 合併與拆分 工具 (高級合併行, 分裂細胞,...)   |   ... 和更多

使用 Kutools for Excel 增強您的 Excel 技能,體驗前所未有的效率。 Kutools for Excel 提供了 300 多種進階功能來提高生產力並節省時間。  點擊此處獲取您最需要的功能...

產品描述


Office選項卡為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