跳到主要内容

如何在Excel中将负数更改为正数?

在Excel中处理操作时,有时可能需要将负数更改为正数,反之亦然。 您可以使用任何快速技巧将负数更改为正数吗? 本文将向您介绍以下技巧,可轻松将所有负数转换为正数,反之亦然。

使用粘贴特殊功能将负数更改为正数

使用 Kutools for Excel 轻松将负数更改为正数

使用VBA代码将范围内的所有负数转换为正数


使用粘贴特殊功能将负数更改为正数

您可以通过以下步骤将负数更改为正数:

1。 输入号码 -1 在空白单元格中,然后选择此单元格,然后按 按Ctrl + C 键复制它。

2。 选择范围内的所有负数,单击鼠标右键,然后选择 特殊粘贴… 从上下文菜单中。 看截图:

笔记:
(1)举行 按Ctrl 键,您可以一一点击所有负数;
(2)如果您安装了Kutools for Excel,您可以应用它 选择特殊单元格 快速选择所有负数的功能。 免费试用!

3。 和a 特殊粘贴 将显示对话框,选择 所有类型 选项 , 选择 选项 操作,单击“ OK。 看截图:

4。 所有选定的负数将转换为正数。 根据需要删除数字-1。 看截图:

在Excel中轻松将负数更改为正数

与手动从单元格中一一删除负号相比,Kutools for Excel's 改变价值观 此功能提供了一种非常简单的方法,可以将选择中的所有负数快速更改为正数。 立即获得 30 天的全功能免费试用!

广告将负面转化为正面

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


使用 Kutools for Excel 快速轻松地将负数更改为正数

大多数Excel用户不想使用VBA代码,是否有任何快速技巧将负数更改为正数? 用于Excel的Kutools 可以轻松轻松地帮助您实现这一目标。

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

1。 选择一个范围,其中包括要更改的负数,然后单击 库工具 > 内容 > 改变价值观.

2。 检查 将所有负值更改为正值操作和点击 Ok。 看截图:

现在,您将看到所有负数变为正数,如下所示:

备注: 有了这个 改变价值的标志 功能,您还可以修正尾随的负号,将所有正数更改为负数,反转所有值的正负号并将所有负值更改为零。 免费试用!

(1)在指定范围内将所有正值快速更改为负值:

(2)轻松反转指定范围内所有值的符号:

(3)在指定范围内轻松将所有负值更改为零:

(4)轻松地将尾随负号固定在指定范围内:

Tips::要使用此功能,您应该安装 Kutools for Excel 首先,请 点击下载并享受 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 将负数更改为正数,反之亦然


Kutools for Excel:超过 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