View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Gord Dibben Gord Dibben is offline
external usenet poster
 
Posts: 22,906
Default 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.