Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
ctdak
 
Posts: n/a
Default Automatically put negative sign in cells with positive numeric dat

I have many cells with positive numeric content that I need to change to
negative numbers without changing the absolute value of the numbers. Is
there a way to highlight a block of cells and have a negative sign inserted
in all of them? It will take me forever to do this manually.

  #2   Report Post  
A C
 
Posts: n/a
Default


"ctdak" wrote in message
...
I have many cells with positive numeric content that I need to change to
negative numbers without changing the absolute value of the numbers. Is
there a way to highlight a block of cells and have a negative sign

inserted
in all of them? It will take me forever to do this manually.


Put -1 (negative 1) in another cell somewhere, and the copy it.
Highlight your data, then click Edit-PasteSpecial. Select Values and also
select the Multiply option.

This will multiply every number in your dataset by -1, which effectively
reverses the sign.
This of course means it wont work if you also have some existing negative
numbers, as those will now become positive.
If this is a problem you can be more selective about which data you reverse,
perhaps only highlighting the numbers which are positive or perhaps use a
filter on your data to display positive rows only.

If the above is not possible (eg you have far to many neg and pos numbers
mixed together to make selecting just the positive ones easily) then try
this.
To only turn positive numbers into negative numbers:
Insert a new worksheet (or use an existing blank one).
If a cell in your new worksheet type the formula:
=if(myDataWorksheet!A1<0,0-myDataWorksheet!A1,myDataWorksheet!A1)
where you should replace myDataWorksheet!A1 with your data worksheet and
first datacell.
Now copy that formula over the matching area of your data.
This formula will copy all your existing data and if its positive it will
reverse the sign. If its negative it will leave it as it is.

You might need some tweaks on this if you have headers or labels etc amongst
your data, but fixing that stuff up will be a lot faster than manually
changing your data. It also has the advantage of not changing your original
data at all.

Hope this helps
A


  #3   Report Post  
ctdak
 
Posts: n/a
Default

Thanks for the response taking various scenarios into account. I got it done.
ctdak


"A C" wrote:


"ctdak" wrote in message
...
I have many cells with positive numeric content that I need to change to
negative numbers without changing the absolute value of the numbers. Is
there a way to highlight a block of cells and have a negative sign

inserted
in all of them? It will take me forever to do this manually.


Put -1 (negative 1) in another cell somewhere, and the copy it.
Highlight your data, then click Edit-PasteSpecial. Select Values and also
select the Multiply option.

This will multiply every number in your dataset by -1, which effectively
reverses the sign.
This of course means it wont work if you also have some existing negative
numbers, as those will now become positive.
If this is a problem you can be more selective about which data you reverse,
perhaps only highlighting the numbers which are positive or perhaps use a
filter on your data to display positive rows only.

If the above is not possible (eg you have far to many neg and pos numbers
mixed together to make selecting just the positive ones easily) then try
this.
To only turn positive numbers into negative numbers:
Insert a new worksheet (or use an existing blank one).
If a cell in your new worksheet type the formula:
=if(myDataWorksheet!A1<0,0-myDataWorksheet!A1,myDataWorksheet!A1)
where you should replace myDataWorksheet!A1 with your data worksheet and
first datacell.
Now copy that formula over the matching area of your data.
This formula will copy all your existing data and if its positive it will
reverse the sign. If its negative it will leave it as it is.

You might need some tweaks on this if you have headers or labels etc amongst
your data, but fixing that stuff up will be a lot faster than manually
changing your data. It also has the advantage of not changing your original
data at all.

Hope this helps
A



  #4   Report Post  
Gord Dibben
 
Posts: n/a
Default

Enter -1 in an empty cell.

Copy that cell. Select your positives and Paste SpecialMultiplyOKEsc


Gord Dibben Excel MVP

On Thu, 23 Jun 2005 17:42:02 -0700, "ctdak"
wrote:

I have many cells with positive numeric content that I need to change to
negative numbers without changing the absolute value of the numbers. Is
there a way to highlight a block of cells and have a negative sign inserted
in all of them? It will take me forever to do this manually.


  #5   Report Post  
ctdak
 
Posts: n/a
Default

Thanks.
Done.

ctdak


"Gord Dibben" wrote:

Enter -1 in an empty cell.

Copy that cell. Select your positives and Paste SpecialMultiplyOKEsc


Gord Dibben Excel MVP

On Thu, 23 Jun 2005 17:42:02 -0700, "ctdak"
wrote:

I have many cells with positive numeric content that I need to change to
negative numbers without changing the absolute value of the numbers. Is
there a way to highlight a block of cells and have a negative sign inserted
in all of them? It will take me forever to do this manually.





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
Negative numbers turn positive automatically on data entry Jerri Excel Discussion (Misc queries) 4 January 8th 05 05:05 PM
How can I automatically change the font color of text in cells th. les Excel Discussion (Misc queries) 1 January 4th 05 03:06 AM
Protected cells -automatically format to a different color Fred Evans Excel Discussion (Misc queries) 9 December 3rd 04 12:59 PM
How do I automatically shade cells depending on data entered? Jim Johnson Excel Worksheet Functions 6 October 29th 04 07:01 PM
Can i automatically format cells to be a certain color if the val. jack442 Excel Worksheet Functions 2 October 28th 04 05:31 PM


All times are GMT +1. The time now is 08:05 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"