Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Changing the sign of cell using a macro

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.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 102
Default Changing the sign of cell using a macro

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 Knauff" wrote in message ...
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.



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 102
Default Changing the sign of cell using a macro

Shoulda mentioned,

DONT USE THIS ON CELLS CONTAINING FORMULAS

Dan E

"Dan E" wrote in message ...
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 Knauff" wrote in message ...
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.





  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Changing the sign of cell using a macro

Thanx a million.
Any idea why MSFT dosen't have a keyboard shortcut for
this one already?

jasonK.

-----Original Message-----
Shoulda mentioned,

DONT USE THIS ON CELLS CONTAINING FORMULAS

Dan E

"Dan E" wrote in

message ...
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 Knauff" wrote in

message ...
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.





.

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default Changing the sign of cell using a macro

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.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
www.cpearson.com

"Jason Knauff" wrote in message
...
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.



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Value Axis - How to remove percent sign without changing values? [email protected] Charts and Charting in Excel 21 April 2nd 23 07:24 PM
Problem with changing cell contents with $ sign MMangen Excel Worksheet Functions 4 December 19th 06 11:22 PM
+ sign changing to - in Excel 2000???? Morrigan Excel Discussion (Misc queries) 1 August 2nd 05 02:04 PM
changing sign simora Excel Worksheet Functions 2 May 8th 05 09:07 PM
Changing Dollar sign to another currency not listed in Excel Rehan Excel Discussion (Misc queries) 1 April 12th 05 04:03 PM


All times are GMT +1. The time now is 10:01 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"