Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 17
Default How do I make a column formatted for only Negative Numbers?


I'm trying to add-subtract various numbers. One column will be nothing but
withdrawals from an account, so I want every number to be negative, so that
if I do calculations with that column, they will always show as deductions.
Is there a way I can set up the cells in that column so that any number I
type in will show as a negative number, ie. a -xx? I can simply type in a
hyphen before, I know, but I like to type fast without even thinking about
that extra and somewhat difficult (for me) key-stroke. Thanks.

dc
  #2   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 8,651
Default How do I make a column formatted for only Negative Numbers?

One option once you've entered all the numbers as positive is to put -1 in a
spare cell, select and copy, the select your column, edit/ paste special/
multiply.

If you just want that column to display as if they were negative numbers,
you could format as "-"General, and then when you want to do calculations
from that column you could subtract instead of adding.
--
David Biddulph

"DeeDeeCee" wrote in message
...

I'm trying to add-subtract various numbers. One column will be nothing but
withdrawals from an account, so I want every number to be negative, so
that
if I do calculations with that column, they will always show as
deductions.
Is there a way I can set up the cells in that column so that any number I
type in will show as a negative number, ie. a -xx? I can simply type in a
hyphen before, I know, but I like to type fast without even thinking about
that extra and somewhat difficult (for me) key-stroke. Thanks.

dc



  #3   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 524
Default How do I make a column formatted for only Negative Numbers?

Mon, 3 Sep 2007 01:50:07 -0700 from DeeDeeCee
:

I'm trying to add-subtract various numbers. One column will be nothing but
withdrawals from an account, so I want every number to be negative, so that
if I do calculations with that column, they will always show as deductions.
Is there a way I can set up the cells in that column so that any number I
type in will show as a negative number, ie. a -xx?


Yes, with custom formatting, but I recommend against it. When you see
a column of negative numbers, sooner or later you'll type a minus
sign in front of one of them and then your computation will give a
wrong result.

--
"First prove what you're saying, then whine about it."
-- /The People's Court/
Stan Brown, Oak Road Systems, Tompkins County, New York, USA
http://OakRoadSystems.com/
  #4   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 22,906
Default How do I make a column formatted for only Negative Numbers?

I know I'm a day late here but if you're still watching............

You could use event code to change the typed numbers to real negatives as you
enter them.

Private Sub Worksheet_Change(ByVal Target As Excel.Range)
'change a number to negative
If Target.Column < 2 Then Exit Sub
If Not IsNumeric(Target.Value) Then Exit Sub
If Not Left(Target.Value, 1) = "-" Then
Application.EnableEvents = False
With Target
.Value = .Value * -1
End With
End If
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.

As written it operates on column 2(B) only. Adjust to suit column number.


Gord Dibben MS Excel MVP

On Mon, 3 Sep 2007 01:50:07 -0700, DeeDeeCee
wrote:


I'm trying to add-subtract various numbers. One column will be nothing but
withdrawals from an account, so I want every number to be negative, so that
if I do calculations with that column, they will always show as deductions.
Is there a way I can set up the cells in that column so that any number I
type in will show as a negative number, ie. a -xx? I can simply type in a
hyphen before, I know, but I like to type fast without even thinking about
that extra and somewhat difficult (for me) key-stroke. Thanks.

dc


  #5   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 17
Default How do I make a column formatted for only Negative Numbers?

Thanks to all 3; I got useful info from each.

ddc


"Gord Dibben" wrote:

I know I'm a day late here but if you're still watching............

You could use event code to change the typed numbers to real negatives as you
enter them.

Private Sub Worksheet_Change(ByVal Target As Excel.Range)
'change a number to negative
If Target.Column < 2 Then Exit Sub
If Not IsNumeric(Target.Value) Then Exit Sub
If Not Left(Target.Value, 1) = "-" Then
Application.EnableEvents = False
With Target
.Value = .Value * -1
End With
End If
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.

As written it operates on column 2(B) only. Adjust to suit column number.


Gord Dibben MS Excel MVP

On Mon, 3 Sep 2007 01:50:07 -0700, DeeDeeCee
wrote:


I'm trying to add-subtract various numbers. One column will be nothing but
withdrawals from an account, so I want every number to be negative, so that
if I do calculations with that column, they will always show as deductions.
Is there a way I can set up the cells in that column so that any number I
type in will show as a negative number, ie. a -xx? I can simply type in a
hyphen before, I know, but I like to type fast without even thinking about
that extra and somewhat difficult (for me) key-stroke. Thanks.

dc



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 to make negative numbers to become 0? [email protected] Excel Worksheet Functions 1 October 26th 06 02:03 PM
how do i make negative numbers equal zero benny1 Excel Worksheet Functions 2 October 23rd 06 08:46 PM
Reformat telephone numbers in a column so all are formatted the s. Maree Excel Discussion (Misc queries) 2 March 1st 06 06:23 PM
How to make negative numbers look like 0 Trisha V via OfficeKB.com Excel Discussion (Misc queries) 12 August 5th 05 07:12 PM
How do I make all numbers in a column negative in excel 2000? jwoodruff77 Excel Discussion (Misc queries) 5 August 3rd 05 12:31 PM


All times are GMT +1. The time now is 12:34 PM.

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"