跳到主要內容

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

如何在Excel中快速將所有正數或值更改為負數? 以下方法可以指導您在Excel中快速將所有正數更改為負數。

2

使用選擇性粘貼功能將正數更改為負數

使用Kutools for Excel將正數更改為負數或反之亦然

使用VBA代碼將正數更改為負數


使用選擇性粘貼功能將正數更改為負數

您可以使用將正數更改為負數 選擇性粘貼 Excel中的功能。 請執行以下操作。

1。 分接頭號 -1 在空白單元格中並將其複制。

2. 突出顯示要更改的範圍,然後單擊鼠標右鍵並選擇 選擇性粘貼 從上下文菜單中打開 選擇性粘貼 對話框。 看截圖:

3。 然後選擇 全部 選項從 來自 手術.

4。 然後點擊 OK,所有正數已更改為負數。

5。 最後,您可以根據需要刪除數字-1。


將正數更改或轉換為負數,反之亦然

這款獨特的敏感免洗唇膜採用 Moisture WrapTM 技術和 Berry Mix ComplexTM 成分, Excel的Kutools改變價值觀 實用程序中,您可以將正數更改為負數,反之亦然,將數字的符號反轉,修正尾隨的負號,等等。 點擊下載Kutools for Excel!


使用Kutools for Excel將正數更改為負數或反之亦然

您還可以使用 Excel的Kutools改變價值觀 快速將所有正數更改為負數的工具。

Excel的Kutools : 帶有300多個便捷的Excel加載項,可以在30天內免費試用. 

如果你已經安裝 Excel的Kutools,您可以將正數更改為負,如下所示:

1。 選擇您要更改的範圍。

2。 點擊 庫工具 > 內容 > 改變價值觀,請參見屏幕截圖:

3。 而在中 改變價值觀 對話框中選擇 將所有正值更改為負值 選項。

4。 然後點擊 OK or 登記。 並且所有正數都已轉換為負數。

2
保養竅門:
  • 要使用此功能,您應該安裝 Excel的Kutools 首先,請 點擊下載並獲得 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將正數更改為負數,反之亦然


Excel的Kutools:超過 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