Forgot to clarify Re: Change Positive to Negative

J1406

New Member
Joined
Oct 20, 2002
Messages
25
Purpose: to key numbers in all cells as positive, however, one column should always be a true negative (many rows in all columns,it'd easier to just key as is & allow the format to automatically convert any number in that column into a negative) I could simply use the minus key each time, but when one is keying many numbers in a limited time frame it would be wonderful not to have the extra step (hitting minus key)
 

Excel Facts

Pivot Table Drill Down
Double-click any number in a pivot table to create a new report showing all detail rows that make up that number
If I understand you correctly, you want to key values into a column (say A) but have those values displayed as negative in another column (say B)

Whilst you could format column A as follows:
[RED](#,##0.00);#,##0.00_);0_)
which will show positive values as (123.45) and negative values as 123.45 it may be easier to include the following formula in column B
=-An (where n is the row number)
or =An*-1

HTH

I've since noticed that this post is a duplicate
_________________
BigC
Carp diem - opportunity knocks so often that it has raw knuckles!
This message was edited by BigC on 2002-10-31 00:46
 
Upvote 0
Howdy J, I think you'll want VBA for such a concept. Here's a worksheet procedure:<pre>
Private Sub Worksheet_Change(ByVal Target As Range)
'change both letters in [a:a] to the appropriate column letter
Application.EnableEvents = False
If Not Intersect(Target, [a:a]) Is Nothing Then _
Target = -Target
Application.EnableEvents = True
End Sub</pre><pre></pre>
Right click on the appropriate worksheet tab, click view code and paste the code above. Change the column letter as mentioned and see if this helps.

_________________
Cheers,<font size=+2><font color="red"> Nate<font color="blue"> Oliver</font></font></font>
This message was edited by NateO on 2002-10-31 13:25
 
Upvote 0

Forum statistics

Threads
1,214,786
Messages
6,121,546
Members
449,038
Latest member
Guest1337

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top