跳到主要内容

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

如何在Excel中快速将所有正数或值更改为负数? 以下方法可以指导您在Excel中快速将所有正数更改为负数。

2

使用选择性粘贴功能将正数更改为负数

使用 Kutools for Excel 将正数更改为负数,反之亦然

使用VBA代码将正数更改为负数


使用选择性粘贴功能将正数更改为负数

您可以使用将正数更改为负数 选择性粘贴 Excel中的功能。 请执行以下操作。

1。 分接头号 -1 在空白单元格中并将其复制。

2. 突出显示要更改的范围,然后单击鼠标右键并选择 选择性粘贴 从上下文菜单中打开 选择性粘贴 对话框。 看截图:

3。 然后选择 所有类型 选项从 来自 操作.

4。 然后点击 OK,所有正数已更改为负数。

5。 最后,您可以根据需要删除数字-1。


将正数更改或转换为负数,反之亦然

Kutools for Excel改变价值观 实用程序中,您可以将正数更改为负数,反之亦然,将数字的符号反转,修正尾随的负号,等等。 点击下载Kutools for Excel!


使用 Kutools for Excel 将正数更改为负数,反之亦然

您还可以使用 Kutools for Excel改变价值观 快速将所有正数更改为负数的工具。

Kutools for Excel : 带有300多个便捷的Excel加载项,可以在30天内免费试用. 

如果你已经安装 Kutools for Excel,您可以将正数更改为负,如下所示:

1。 选择您要更改的范围。

2。 点击 库工具 > 内容 > 改变价值观,请参见屏幕截图:

3. 而在 改变价值观 对话框中选择 将所有正值更改为负值 选项。

4。 然后点击 OK or 使用。 并且所有正数都已转换为负数。

2
Tips:
  • 要使用此功能,您应该安装 Kutools for Excel 首先,请 点击下载并享受 30 天免费试用 现在。
  • 要将所有负数更改或转换为正数,请选择 将所有负值更改为正值 在对话框中,如下图所示:


    Kutools for Excel的 改变价值观 还可以 修复尾随的负号, 将所有负值更改为正值 等等。 有关值更改符号的更多详细信息,请访问 更改值的符号功能描述.

使用VBA代码将正数更改为负数

使用VBA代码,您也可以将正数更改为负数,但是您必须知道如何使用VBA。 请按照以下步骤操作:

1。 选择您要更改的范围。

2。 点击 开发商 >Visual Basic中,一个新的 适用于应用程序的Microsoft Visual Basic 将显示一个窗口,单击 插页 > 模块然后将以下代码复制并粘贴到模块中:

Sub ChangeToNegative()
'Updateby Extendoffice
Dim rng As Range
Dim WorkRng As Range
On Error Resume Next
xTitleId = "KutoolsforExcel"
Set WorkRng = Application.Selection
Set WorkRng = Application.InputBox("Range", xTitleId, WorkRng.Address, Type:=8)
Set WorkRng = WorkRng.SpecialCells(xlCellTypeConstants, xlNumbers)
For Each rng In WorkRng
    xValue = rng.Value
    If xValue > 0 Then
        rng.Value = xValue * -1
    End If
Next
End Sub

3. 点击 文档-阳性-阴性-2 按钮运行代码,将弹出一个对话框,供您选择要将正值转换为负值的范围。 看截图:

4。 点击 Ok,然后将所选范围内的正值立即转换为负值。


演示:使用 Kutools for Excel 将正数更改为负数,反之亦然


Kutools for Excel:超过 300 个方便的工具触手可及! 立即开始 30 天免费试用,没有任何功能限制。 立即下载!
Comments (21)
Rated 5 out of 5 · 1 ratings
This comment was minimized by the moderator on the site
thank u, now i succesfully edit my data
Rated 5 out of 5
This comment was minimized by the moderator on the site
WAW is amazing
This comment was minimized by the moderator on the site
thank u very much
This comment was minimized by the moderator on the site
oh my gosh, that was so easy and helpful (paste special)
This comment was minimized by the moderator on the site
Thanks a lots...
This comment was minimized by the moderator on the site
Thank you for the guidance. Clear and easy to understand.
This comment was minimized by the moderator on the site
Helpful..thanks. would need more help in future..
This comment was minimized by the moderator on the site
Put the figure in brackets
This comment was minimized by the moderator on the site
AWESOME!! nice, quick, easy.
This comment was minimized by the moderator on the site
I need to add an tool for typing like word in vb.net 2003, which should be called on demand like button click or placed i form. Also user should be able to create auto correct option int it. Basiclly user should be able to type, format and auto correct text. Your feedback will be of great help.
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