Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
negative numbers
can I format a column so that when I type in the number in the cell, it will
automatically appear as a negative. I don't want to always do -_____then the number. Thanks. |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
negative numbers
Try Format Cells == Custom as "-#" (no quotes)
"gypsy" wrote: can I format a column so that when I type in the number in the cell, it will automatically appear as a negative. I don't want to always do -_____then the number. Thanks. |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
negative numbers
Just so the OP is aware.....
That doesn't make the number a negative number. It's just a positive number with a minus sign in front of it. You would need an event macro to change a positive number to negative number. Biff "Toppers" wrote in message ... Try Format Cells == Custom as "-#" (no quotes) "gypsy" wrote: can I format a column so that when I type in the number in the cell, it will automatically appear as a negative. I don't want to always do -_____then the number. Thanks. |
#4
Posted to microsoft.public.excel.misc
|
|||
|
|||
negative numbers
Thanks Biff. I'll to stop replying in the early morning as my limited brain
isn't in gear. "T. Valko" wrote: Just so the OP is aware..... That doesn't make the number a negative number. It's just a positive number with a minus sign in front of it. You would need an event macro to change a positive number to negative number. Biff "Toppers" wrote in message ... Try Format Cells == Custom as "-#" (no quotes) "gypsy" wrote: can I format a column so that when I type in the number in the cell, it will automatically appear as a negative. I don't want to always do -_____then the number. Thanks. |
#5
Posted to microsoft.public.excel.misc
|
|||
|
|||
negative numbers
gypsy
You cannot pre-format the cells as negative. You could use event code to change them to negative as you enter. Private Sub Worksheet_Change(ByVal Target As Range) On Error GoTo ws_exit: Application.EnableEvents = False If Not Intersect(Target, Me.Range("A1:A10")) Is Nothing Then With Target If .Value < "" Then .Value = .Value * -1 End If End With End If ws_exit: Application.EnableEvents = True End Sub Right-click on the sheet tab and "View Code" Copy/paste the above into that module. Edit the range of A1:A10 to suit. Gord Dibben MS Excel MVP On Thu, 30 Nov 2006 17:47:00 -0800, gypsy wrote: can I format a column so that when I type in the number in the cell, it will automatically appear as a negative. I don't want to always do -_____then the number. Thanks. Gord Dibben MS Excel MVP |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
negative numbers | Excel Discussion (Misc queries) | |||
"find and replace" negative numbers | Excel Worksheet Functions | |||
How do I replace negative numbers with zero in Excel. | Excel Worksheet Functions | |||
convert negative numbers to positive numbers and vice versa | Excel Worksheet Functions | |||
Add sequences of positive then negative numbers | Excel Discussion (Misc queries) |