Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Column of negative numbers
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 |
#2
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Column of negative numbers
You could format the column to look like negative numbers but the numbers
would still be positive. Much better to enter them as positive and then change them by entering -1 in an empty cell, copying it, highlighting the column and the selecting Paste Special Multiply -- HTH Sandy In Perth, the ancient capital of Scotland and the crowning place of kings Replace @mailinator.com with @tiscali.co.uk "MS" wrote in message ... 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 |
#3
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Column of negative numbers
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 |
#4
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Column of negative numbers
Thank you Sandy
"Sandy Mann" wrote: You could format the column to look like negative numbers but the numbers would still be positive. Much better to enter them as positive and then change them by entering -1 in an empty cell, copying it, highlighting the column and the selecting Paste Special Multiply -- HTH Sandy In Perth, the ancient capital of Scotland and the crowning place of kings Replace @mailinator.com with @tiscali.co.uk "MS" wrote in message ... 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 |
#5
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How do I make a column formatted for only Negative Numbers? | New Users to Excel | |||
column of negative numbers into positive numbers | Excel Worksheet Functions | |||
Excel Formula - Add column of numbers but ignore negative numbers | Excel Worksheet Functions | |||
Formula to ignore negative numbers in a column? | Excel Worksheet Functions | |||
How do I change the plus to a negative in a column of numbers? | Excel Worksheet Functions |