Changing the sign of cell using a macro

  • Thread starter Thread starter Jason Knauff
  • Start date Start date
J

Jason Knauff

Does anyone have a macro written that will change the sign
(from positive to negative or negative to positive) of a
number in a cell in excel? Or, does MSFT already have a
keyboard shortcut for this operation? Please help.
 
Jason,

Here's one that'll change the signs of all selected cells

Sub ChangeSign()
For Each c In Selection
c.Value = -c.Value
Next
End Sub

Dan E
 
Jason,

Enter -1 in some cell. Copy that cell. Then select the cells whose signs
you want to change. Then go to the Edit menu Choose Paste Special, and
choose the Multiply option.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top