跳到主要內容

如何在Excel中將負數更改為正數?

在Excel中處理操作時,有時可能需要將負數更改為正數,反之亦然。 您可以使用任何快速技巧將負數更改為正數嗎? 本文將向您介紹以下技巧,可輕鬆將所有負數轉換為正數,反之亦然。

使用粘貼特殊功能將負數更改為正數

使用Kutools for Excel輕鬆將負數更改為正數

使用VBA代碼將範圍內的所有負數轉換為正數


使用粘貼特殊功能將負數更改為正數

您可以通過以下步驟將負數更改為正數:

1。 輸入號碼 -1 在空白單元格中,然後選擇此單元格,然後按 按Ctrl + C 鍵複製它。

2。 選擇範圍內的所有負數,單擊鼠標右鍵,然後選擇 特殊粘貼… 從上下文菜單中。 看截圖:

筆記:
(1)舉行 按Ctrl 鍵,可以一一點擊所有負數;
(2)如果您已安裝Kutools for Excel,則可以應用它 選擇特殊單元格 快速選擇所有負數的功能。 免費試用!

3。 和a 特殊粘貼 將顯示對話框,選擇 全部 選項 , 選擇 選項 手術點擊此處成為Trail Hunter OK。 看截圖:

4。 所有選定的負數將轉換為正數。 根據需要刪除數字-1。 看截圖:

在Excel中輕鬆將負數更改為正數

與手動逐個刪除單元格中的負號​​相比,Kutools for Excel的 改變價值觀 該功能提供了一種非常簡單的方法,可以將選擇中的所有負數快速更改為正數。 立即獲得 30 天的全功能免費試用!

廣告將負面轉化為正面

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


使用Kutools for Excel快速輕鬆地將負數更改為正數

大多數Excel用戶不想使用VBA代碼,是否有任何快速技巧將負數更改為正數? Kutools for Excel 可以輕鬆輕鬆地幫助您實現這一目標。

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

1。 選擇一個範圍,包括要更改的負數,然後單擊 庫工具 > 內容 > 改變價值觀.

2。 檢查 將所有負值更改為正值手術,然後點擊 Ok。 看截圖:

現在,您將看到所有負數變為正數,如下所示:

備註: 有了這個 改變價值的象徵 功能,您還可以修正尾隨的負號,將所有正數更改為負數,反轉所有值的正負號並將所有負值更改為零。 免費試用!

(1)在指定範圍內將所有正值快速更改為負值:

(2)輕鬆反轉指定範圍內所有值的符號:

(3)在指定範圍內輕鬆將所有負值更改為零:

(4)輕鬆地將尾隨負號固定在指定範圍內:

尖端:要使用此功能,您應該安裝 Excel的Kutools 首先,請 點擊下載並獲得 30 天免費試用

使用VBA代碼將範圍內的所有負數轉換為正數

作為Excel專業人士,您還可以運行VBA代碼將負數更改為正數。

1。 按Alt + F11鍵以打開“ Microsoft Visual Basic應用程序”窗口。

2。 將顯示一個新窗口。 請點擊 插入 > 模塊,然後在模塊中輸入以下代碼:

Sub Positive
Dim Cel As Range
For Each Cel In Selection
If IsNumeric(Cel.Value) Then
Cel.Value = Abs(Cel.Value)
End If
Next Cel
End Sub

3。 然後點擊 按鈕或按下 F5 鍵以運行應用程序,所有負數都將更改為正數。 看截圖:


演示:使用Kutools for Excel將負數更改為正數,反之亦然


Excel的Kutools:超過 300 個方便的工具觸手可及! 立即開始 30 天免費試用,沒有任何功能限制。 現在就下載!
Comments (31)
Rated 4.5 out of 5 · 1 ratings
This comment was minimized by the moderator on the site
=sqrt((numbers)^2)
This comment was minimized by the moderator on the site
Hi Kevin Alexander,
The SQRT function is a good way. However, if you want to convert a negative number to positive by excel formula/function, you can use the ABS function directly, =ABS(your_negative_number). For example, =ABS(-5) will return 5.
This comment was minimized by the moderator on the site
I chose a simpler solution, no formulas needed. First, to preserve the original data in case I goofed up, I copied the raw CMM measurement data in Worksheet 1 to Worksheet 2. Next, In Worksheet 2, I selected the multiple disconnected blocks of cells which had some negative numbers I wanted to convert to positive numbers. Then, I simply used the “replace” function to replace the minus sign with … nothing! It worked perfectly, and was clean; no formulas, no conditional formatting, and the raw unaltered data remained on Worksheet 1 as my backup resource. Applying a formula is not always the answer. I love using Excel to do data logging, tracking, analysis, and to answer so many math questions, both at work and personally. At work, I measure parts, and the machine measures distances to the left as negative numbers, and not just a positive number distance. Other measurements, though, are at a position of being on a datum X or Y, at zero. Those measurements will be off zero in the positive or negative direction, and I need hose occasional negative numbers to remain negative. That meant I had to select a partial column here, another there, and skip ones that measured around a zero target, then apply that “negative sign removal) to only those measurements that were negatives, but did not have zero as the target dimension. It is probably confusing until actually seeing the spreadsheet I was fixing, but the method I chose worked perfectly, and had no formula involved, just a clean minus-sign removal done as a “replace” edit. Thank you, Joel
This comment was minimized by the moderator on the site
Thank you so much!
This comment was minimized by the moderator on the site
use this formula (A1 is a cell reference in which you want to convert) =max(A1,-A1) What this formula does is to choose the highest number, and positive will normally be the highest number.
This comment was minimized by the moderator on the site
Taimoor, Your solution requires adding a column of formulas. The easiest way is to use "find and replace", as I explained here on 4/20/16. Enter a dash in the first line, nothing in the second, and replace as many of them as you want ("find next" or "replace all"). Not "complexed" at all. Your method creates clutter on the spreadsheet with a new column of formulas that requires the first column of negative numbers to remain, although it is now just a sub-component of the formulas column. Then, if you want to clean up the spreadsheet, you would have to hide that first column of negative numbers. Messy. No thank you. You say other people's methods are "complexed", but yours is not, IMHO, much, if any, of an improvement.
This comment was minimized by the moderator on the site
"Formulas? We don' need no ... " Click on Find and Replace. Enter a dash in the "Find What" section. Leave the "Replace With" section blank. Click "Replace All" and BAM! Negativity" gone. If you want to play it safe, and aren't sure about whether or not you will muck up your spreadsheet, copy Sheet 1 to Sheet 2, then perform the Find and Replace action with Sheet 2. If you like it, copy what you want and paste it back into Sheet 1. Safe as can be!
This comment was minimized by the moderator on the site
Click on that Negative Number. Right Click & go on Format Cell & click on 1234.
This comment was minimized by the moderator on the site
Sachin, when you go to "Format Cell, and do as you suggested, that does not change the value of the number, it will only change the format, the color. And you left out a couple steps: 1. what tab to click on (number?), and 2. what category in that tab do you choose, then 3. which style option do you select (which still will not change the VALUE of the number, only the appearance (negative numbers showing in red, for example).
This comment was minimized by the moderator on the site
It's so simple. Don't know why it's been explained in such a complexed manner. Suppose you have a column A with following values: Cell A: A2= -4000 A3= -5000 A4= -8000 Apply the formula in cell B2 =A2*(-1) And drag it down till the last value of column A. Done!
This comment was minimized by the moderator on the site
Just did the copy/paste -1 onto highlighted positive numbers and puff, like magic my job is done here. Big time saver big help
This comment was minimized by the moderator on the site
I've found highlighting the column hitting ctrl F, then replacing - with nothing will remove the -. Its easy
This comment was minimized by the moderator on the site
It is so simple if you multiply -1 with the value or column and drag the formula :)
There are no comments posted here yet
Load More
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations