Note: The other languages of the website are Google-translated. Back to English
登陆  \/ 
x
or
x
点此注册  \/ 
x

or

如何在Excel中反转单元格中值的符号?

当我们使用excel时,工作表中既有正数也有负数。 假设我们需要将正数更改为负数,反之亦然。 当然,我们可以手动更改它们,但是如果需要更改数百个数字,则此方法不是一个好的选择。 是否有任何快速的技巧来解决此问题?

使用选择性粘贴功能反转单元格中值的符号

用VBA代码反转单元格中值的符号

使用Kutools for Excel快速反转单元格中值的符号


箭头蓝色右气泡 使用选择性粘贴功能反转单元格中值的符号

我们可以使用 选择性粘贴 Excel中的函数,请执行以下操作:

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

2。 选择要反转值符号的范围,右键单击并选择 选择性粘贴。 看截图:

3.选择性粘贴 对话框,单击 全部 来自的选项 选项 手术。 看截图:

4。 然后点击 OK,并且该范围内数字的所有符号均已反转。

5。 根据需要删除数字-1。


一次反转所有数字的符号

Kutools for Excel改变价值观 实用程序可以帮助您将正数更改为负数,反之亦然,还可以帮助您反转值的正负号并将尾随的负号修复为正常值。  点击下载Kutools for Excel!

Kutools for Excel:具有300多个方便的Excel加载项,可以在30天内免费试用,没有任何限制。 立即下载并免费试用!


箭头蓝色右气泡 用VBA代码反转单元格中值的符号

同样,我们可以使用VBA代码来反转单元格中值的符号。 但是我们必须知道如何让VBA来做这件事。 我们可以按照以下步骤进行操作:

1. 选择要反转单元格中值的符号的范围。

2。 点击 开发人员 > Visual Basic中 在Excel中, 适用于应用程序的Microsoft Visual Basic 将显示窗口,或使用快捷键(Alt + F11)激活它。 然后点击 插页 > 模块,然后复制并粘贴以下VBA代码:

Sub Convert()
Dim C As Range
For Each C In Selection
C.Value = -C.Value
Next C
End Sub

3. 然后点击 doc-reverse-sign-6 按钮运行代码。 所选范围内的数字符号立即被反转。


箭头蓝色右气泡 使用Kutools for Excel快速反转单元格中值的符号

我们可以使用 改变价值观 的特点 Kutools for Excel.

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

安装后 Kutools for Excel,请执行以下操作:

1. 选择要反转数字符号的范围。

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

3。 在 改变价值观 对话框,检查 反转所有值的符号,请参见屏幕截图:

doc值反向符号5

4。 然后点击 OK or 申请。 数字的所有符号均已反转。

热带地区的 改变价值观 Kutools for Excel也可以 修复尾随的负号,C将所有负值保留为正数将所有正值更改为负值。 有关更多详细信息 改变价值观,请访问: 更改值的符号功能描述.

单击此处立即下载并免费试用Kutools for Excel!


箭头蓝色右气泡 使用Kutools for Excel反转单元格中值的符号

Kutools for Excel:具有300多个方便的Excel加载项,可以在30天内免费试用,没有任何限制。 立即下载并免费试用!

相关文章:


最佳办公效率工具

Kutools for Excel解决了您的大多数问题,并使您的生产率提高了80%

  • 重用: 快速插入 复杂的公式,图表 以及您以前使用过的任何东西; 加密单元 带密码 创建邮件列表 并发送电子邮件...
  • 超级公式栏 (轻松编辑多行文本和公式); 阅读版式 (轻松读取和编辑大量单元格); 粘贴到过滤范围...
  • 合并单元格/行/列 不会丢失数据; 拆分单元格内容; 合并重复的行/列...防止细胞重复; 比较范围...
  • 选择重复或唯一 行; 选择空白行 (所有单元格都是空的); 超级查找和模糊查找 在许多工作簿中; 随机选择...
  • 确切的副本 多个单元格,无需更改公式参考; 自动创建参考 到多张纸; 插入项目符号,复选框等...
  • 提取文字,添加文本,按位置删除, 删除空间; 创建和打印分页小计; 在单元格内容和注释之间转换...
  • 超级滤镜 (将过滤方案保存并应用于其他工作表); 高级排序 按月/周/日,频率及更多; 特殊过滤器 用粗体,斜体...
  • 结合工作簿和工作表; 根据关键列合并表; 将数据分割成多个工作表; 批量转换xls,xlsx和PDF...
  • 超过300种强大功能。 支持Office / Excel 2007-2019和365。支持所有语言。 在您的企业或组织中轻松部署。 完整功能30天免费试用。 60天退款保证。
kte选项卡201905

Office选项卡为Office带来了选项卡式界面,使您的工作更加轻松

  • 在Word,Excel,PowerPoint中启用选项卡式编辑和阅读,发布者,Access,Visio和Project。
  • 在同一窗口的新选项卡中而不是在新窗口中打开并创建多个文档。
  • 每天将您的工作效率提高50%,并减少数百次鼠标单击!
officetab底部
Say something here...
symbols left.
You are guest
or post as a guest, but your post won't be published automatically.
Loading comment... The comment will be refreshed after 00:00.
  • To post as a guest, your comment is unpublished.
    Aaron · 3 years ago
    Tried to do the developer option and I get a:
    Run-time error '438':
    Object doesn't support this property or method


    Any ideas?
  • To post as a guest, your comment is unpublished.
    Bob · 4 years ago
    @Taylor Yes. Yes it does. Enter "-1" in a cell. Copy that cell. Highlight all the values whose sign you wish to flip. Opt-Cmd-V opens paste special dialog box, choose multiply from the Operations section (I also find it beneficial to choose "values" in the Paste Section rather than "all" to preserve any formatting).
  • To post as a guest, your comment is unpublished.
    Taylor · 4 years ago
    I have a mac version of excel and the paste special doesn't allow me to do that :-/ dying.
  • To post as a guest, your comment is unpublished.
    Emoployee · 5 years ago
    Thx Bro for the useful thread
  • To post as a guest, your comment is unpublished.
    Hasan · 5 years ago
    Thank you so much, Sir. You helped me a lot. I hope I can return the favor. Thank you so much.
  • To post as a guest, your comment is unpublished.
    CHRISTINE · 5 years ago
    thank you

    i had just posted in the SUN system with the srong month. this has helped me to reverse all the 195 entries within 7 minutes...
  • To post as a guest, your comment is unpublished.
    Vikas · 6 years ago
    @Michaelq Michaelq please use abs function. It turns negative and positive values both to positive one.
  • To post as a guest, your comment is unpublished.
    David K · 6 years ago
    From my perspective it seems there is no foolproof way to simply remove a negative sign:

    Multiplying by -1 can screw up subsequent cell values if each one is using a formula.
    VBA requires saving in a different format.
    Kutools requires you to download/purchase an add-on.

    You can format a column to show negatives as positives, but it turns the font Red.
  • To post as a guest, your comment is unpublished.
    Kevin Cox · 6 years ago
    I'm looking to add multiple $ to cells with formulas example (=((I29+AM29+AV29+BH29+CG29+CP29+DS29+AJ78+BA91+BU91+CO91+DK78)-(V25+EF25+EN25))/4

    Is there away to do this quickly...
  • To post as a guest, your comment is unpublished.
    Michaelq · 6 years ago
    This is tangentially related. I have a workbook in Excel 2013 that's baffling me. I get a #VALUE! error with the formula =SUM(8-(F4:F23)) in cell F2.

    When I reverse that, =SUM(F4:F23)-8), I get (#) where (#) is the negative of what I expect.

    But when I use #Jonathon's formula with my working formula in it, I again get the #VALUE! error.

    How is this #VALUE! error even possible? What I want is for F2 to be a positive number that's the leftover balance when F4:F24 is less that 8.
  • To post as a guest, your comment is unpublished.
    Jonathan · 6 years ago
    @JAVED KHAN OMG THANK YOU SOOO MUCH. I have been looking all over the place for a way to simply do this. I was trying to find a way to have Excel take the SUM of a group of numbers and make it negative so that it would automatically do all the rest of the math on the sheet correctly. If anyone else is looking to do something similar, using the information I just obtained from #JAVED KHAN, enter the following function (this is just an example, change the cell references to match the ranges you are needing to use)

    =SUM(B2:H2) * -1

    This will now take the sum of the range and automatically change the value to a negative number.
  • To post as a guest, your comment is unpublished.
    CPH1810 · 6 years ago
    @JAVED KHAN You sir have just blown my mind with your Excel Ninja ways, I tip my hat to you sir :lol:
  • To post as a guest, your comment is unpublished.
    wolfstevent · 7 years ago
    @JAVED KHAN The goal was to change an entire range of cells easily, not just a single cell. The paste multiply method is basically a one step procedure to do just that.
  • To post as a guest, your comment is unpublished.
    wolfstevent · 7 years ago
    Very cool trick. I imported transactions from BofA and AMEX and of course they use different signs for debits. One multiply paste later and I'm all fixed up.

    Thanks.
  • To post as a guest, your comment is unpublished.
    JAVED KHAN · 7 years ago
    In a New Cell simply Multiply a the Cell-value by -1. It will reverse automatically. No need to perform such a long procedures.

    e.g if the value in B1 is -25 then in Cell C1 enter the formula :

    =B1 * -1

    :-)