Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
BW BW is offline
external usenet poster
 
Posts: 49
Default Having the contains of a cell always be negative

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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 430
Default Having the contains of a cell always be negative

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   Report Post  
Posted to microsoft.public.excel.misc
BW BW is offline
external usenet poster
 
Posts: 49
Default Having the contains of a cell always be negative

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   Report Post  
Posted to microsoft.public.excel.misc
BW BW is offline
external usenet poster
 
Posts: 49
Default Having the contains of a cell always be negative

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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5,939
Default Having the contains of a cell always be negative

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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default Having the contains of a cell always be negative

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I use the If function to tell me if a cell has a negative pcmurph Excel Worksheet Functions 0 February 15th 07 03:35 PM
How do I use the If function to tell me if a cell has a negative Joel Excel Worksheet Functions 0 February 15th 07 03:27 PM
zero on negative cell help Excel Discussion (Misc queries) 1 July 28th 06 06:37 PM
How to show negative in cell? Brett Romero Excel Worksheet Functions 7 January 9th 06 07:11 AM
Format cell for negative es Excel Discussion (Misc queries) 3 March 4th 05 01:23 PM


All times are GMT +1. The time now is 08:08 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"