If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Negative numbers
Is there a way to make a number be a negative number when it is entered in? I
need to add a total of figures and have it subtract from another total. |
#2
|
|||
|
|||
Negative numbers
Yes. Type in a minus sign - before the number.
-- David Biddulph "Vercingetorix.XIII" wrote in message ... Is there a way to make a number be a negative number when it is entered in? I need to add a total of figures and have it subtract from another total. |
#3
|
|||
|
|||
Negative numbers
Selet the cell, then select format cells Select Custom and type -0. Then all
integer input with change to negative. e.g. type 123 will display -123. "Vercingetorix.XIII" wrote: Is there a way to make a number be a negative number when it is entered in? I need to add a total of figures and have it subtract from another total. |
#4
|
|||
|
|||
Negative numbers
And do you think that the arithmetic will treat that as a negative number as
the OP requested, Candice, or will it do the same as other formatting and merely change the *display* of the number? -- David Biddulph "Candicehkjc" wrote in message ... Selet the cell, then select format cells Select Custom and type -0. Then all integer input with change to negative. e.g. type 123 will display -123. "Vercingetorix.XIII" wrote: Is there a way to make a number be a negative number when it is entered in? I need to add a total of figures and have it subtract from another total. |
#5
|
|||
|
|||
Negative numbers
That will "display" only.
The number will still be positive. Gord Dibben MS Excel MVP On Sun, 21 Sep 2008 08:42:01 -0700, Candicehkjc wrote: Selet the cell, then select format cells Select Custom and type -0. Then all integer input with change to negative. e.g. type 123 will display -123. "Vercingetorix.XIII" wrote: Is there a way to make a number be a negative number when it is entered in? I need to add a total of figures and have it subtract from another total. |
#6
|
|||
|
|||
Negative numbers
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Column = 1 Then On Error GoTo endit Application.EnableEvents = False Target.Value = Target.Value * -1 End If endit: Application.EnableEvents = True End Sub This is sheet event code. Right-click on the sheet tab and "View Code" Copy/paste the code into that module. Alt + q to return to the Excel window. Enter any numbers in column A as positive and they will become negative. Gord Dibben MS Excel MVP On Sun, 21 Sep 2008 07:49:00 -0700, Vercingetorix.XIII wrote: Is there a way to make a number be a negative number when it is entered in? I need to add a total of figures and have it subtract from another total. |
Thread Tools | |
Display Modes | |
|
|