#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 6
Default Negative Number

Is there a way to enter a number in a cell and have the number automatically
appear as a negative number without entering "-" before it.

TIA
Joe
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4,339
Default Negative Number

This will change ALL data entered in column B (2) to negative values (code
courtesy of Bob Phillips).

HTH

Private Sub Worksheet_Change(ByVal Target As Range)

On Error GoTo ws_exit:
Application.EnableEvents = False
With Target
If .Column = 2 Then ' Change to required column
.Value = Value * -1
End If
End With

ws_exit:
Application.EnableEvents = True
End Sub

'This is worksheet event code, which means that it needs to be
'placed in the appropriate worksheet code module, not a standard
'code module. To do this, right-click on the sheet tab, select
'the View Code option from the menu, and paste the code in.

"JoeMNY" wrote:

Is there a way to enter a number in a cell and have the number automatically
appear as a negative number without entering "-" before it.

TIA
Joe

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,440
Default Negative Number

Hi Joe,

Format Custom as -0;-0

The number will only appear negative; the value is still positive

--
Kind regards,

Niek Otten
Microsoft MVP - Excel

"JoeMNY" wrote in message ...
| Is there a way to enter a number in a cell and have the number automatically
| appear as a negative number without entering "-" before it.
|
| TIA
| Joe


  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 623
Default Negative Number

Another option is to enter all numbers as positive, then multiply the range
by -1. To do that, put -1 in a cell, copy it, highlight the range you entered,
use Paste SpecialMultiply

--
Regards,
Fred


"JoeMNY" wrote in message
...
Is there a way to enter a number in a cell and have the number automatically
appear as a negative number without entering "-" before it.

TIA
Joe



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
Converting Negative Number to Postive number Tedd Excel Worksheet Functions 7 September 2nd 09 04:34 PM
First negative number Iriemon Excel Worksheet Functions 3 October 9th 06 08:32 PM
negative number to positive number Mike Casey Excel Discussion (Misc queries) 2 April 26th 06 05:43 PM
Negative number GARY Excel Discussion (Misc queries) 2 March 10th 06 12:46 AM
2003= negative number&2004= negative number How Do I Calculate gro Jason Excel Worksheet Functions 1 January 14th 05 05:24 PM


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

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

About Us

"It's about Microsoft Excel"