Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
I have a worksheet that has several cells that when data is entered will
always need to be negative. How can I enter the number without having to put the minus sign in and have it come out as a negative. -- B |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Try this, hilight all the cells or column you want this for, right click,
'Format cells'----'custom' in the box where it says 'type' type in -###### "BW" wrote: I have a worksheet that has several cells that when data is entered will always need to be negative. How can I enter the number without having to put the minus sign in and have it come out as a negative. -- B |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Tim M
This solved my problem, thank you very much for your quick response. -- B "tim m" wrote: Try this, hilight all the cells or column you want this for, right click, 'Format cells'----'custom' in the box where it says 'type' type in -###### "BW" wrote: I have a worksheet that has several cells that when data is entered will always need to be negative. How can I enter the number without having to put the minus sign in and have it come out as a negative. -- B |
#4
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
This ended up working for the most part. The one problem that I ran into was
using this did get the number to enter as a negative, but when you do a sum it is still considered as a postivie number. Are they any thoughts on how to make it sum as if it is a negative number. -- B "BW" wrote: Tim M This solved my problem, thank you very much for your quick response. -- B "tim m" wrote: Try this, hilight all the cells or column you want this for, right click, 'Format cells'----'custom' in the box where it says 'type' type in -###### "BW" wrote: I have a worksheet that has several cells that when data is entered will always need to be negative. How can I enter the number without having to put the minus sign in and have it come out as a negative. -- B |
#5
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
You problem is that the numbers only look negative. They are stored as
positive or negative so your sums are incorrect. You can us an array formula to coerce the numbers prior to adding them... =SUM(-ABS(A1:A10)) ***NOTE that this is an array formula and as such you can not just commit it with <Enter. you need to use Ctrl + Shift + <Enter ********* -- HTH... Jim Thomlinson "BW" wrote: This ended up working for the most part. The one problem that I ran into was using this did get the number to enter as a negative, but when you do a sum it is still considered as a postivie number. Are they any thoughts on how to make it sum as if it is a negative number. -- B "BW" wrote: Tim M This solved my problem, thank you very much for your quick response. -- B "tim m" wrote: Try this, hilight all the cells or column you want this for, right click, 'Format cells'----'custom' in the box where it says 'type' type in -###### "BW" wrote: I have a worksheet that has several cells that when data is entered will always need to be negative. How can I enter the number without having to put the minus sign in and have it come out as a negative. -- B |
#6
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Changing a format does not change the underlying value of the cell.
You could use event code to do it in place as you enter a number. Private Sub Worksheet_Change(ByVal Target As Excel.Range) On Error GoTo enditall Application.EnableEvents = False If Target.Cells.Column = 1 Then With Target .Value = .Value * -1 End With End If enditall: Application.EnableEvents = True End Sub Gord Dibben MS Excel MVP On Fri, 27 Jun 2008 09:28:01 -0700, BW wrote: I have a worksheet that has several cells that when data is entered will always need to be negative. How can I enter the number without having to put the minus sign in and have it come out as a negative. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How do I use the If function to tell me if a cell has a negative | Excel Worksheet Functions | |||
How do I use the If function to tell me if a cell has a negative | Excel Worksheet Functions | |||
zero on negative cell | Excel Discussion (Misc queries) | |||
How to show negative in cell? | Excel Worksheet Functions | |||
Format cell for negative | Excel Discussion (Misc queries) |