Uploaded November 2019 | Updated November 2026, 13 hours ago
How to create a plus minus switch to convert positive numbers to negative and negative numbers to positive numbers automatically without converting dates and numbers obtained via formulas using VBA.
Here's the complete VBA code:
Sub PlusMinusConverter()
Dim cel As Range
On Error Resume Next
For Each cel In Selection
If Not cel.HasFormula Then cel.Value = -cel.Value
Next cel
End Sub
How to create a plus minus switch to convert positive numbers to negative and negative numbers to positive numbers automatically without converting dates and numbers obtained via formulas using VBA.
Here's the complete VBA code:
Sub PlusMinusConverter()
Dim cel As Range
On Error Resume Next
For Each cel In Selection
If Not cel.HasFormula Then cel.Value = -cel.Value
Next cel
End Sub










