View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
MS MS is offline
external usenet poster
 
Posts: 26
Default Column of negative numbers

Thank you Gord.
MS

"Gord Dibben" wrote:

If you truly want them to be negative you could use event code that would
multiply them by -1 when entered.

Private Sub Worksheet_Change(ByVal Target As Range)
Const MY_RANGE As String = "A1:A10"
On Error GoTo endit:
Application.EnableEvents = False
If Not Intersect(Target, Me.Range(MY_RANGE)) Is Nothing Then
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 into that sheet module.

Adjust MY_RANGE to suit.


Gord Dibben MS Excel MVP


On Sat, 22 Sep 2007 11:42:00 -0700, MS wrote:

Is it possible to highlight and format a part of a column before entering
data so that whatever entered is a negative number? This way i do not have
to press the minus sign before entering the number.

Thank u
ms