A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » New Users
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Can numbers be typed to automatically be negative in cells?



 
 
Thread Tools Display Modes
  #1  
Old December 8th, 2005, 09:21 PM posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: n/a
Default Can numbers be typed to automatically be negative in cells?

I am a new excel user.

I am doing a basic spread sheet. I would like to have cells formated so
that when I type in a number it automatically is negative and appears red.
Is this possible. I have not been able to ask "help" correctly to find it.

Thanks
  #2  
Old December 8th, 2005, 10:25 PM posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: n/a
Default Can numbers be typed to automatically be negative in cells?

finn

Not without resorting to some event code to turn the numbers negative.

Private Sub Worksheet_Change(ByVal Target As Range)
On Error GoTo ws_exit:
Application.EnableEvents = False
If Not Intersect(Target, Me.Range("A1100")) Is Nothing Then
With Target
If .Value "" Then
.Value = .Value * -1
.NumberFormat = "0.00_);[Red](0.00)"
End If
End With
End If
ws_exit:
Application.EnableEvents = True
End Sub


This is worksheet event code.

Right-click on the sheet tab and "View Code". Copy/paste into that module.

NOTE: the Me.Range can be altered to what you wish.

Maybe a simpler way would be to not use the event code and just enter the
numbers as positive then put -1 in an empty cell. Copy that cell, select your
range of numbers and Paste SpecialMultiplyOKEsc.

Format to negative red using FormatCellsNumberNumberNegative numbers.


Gord Dibben Excel MVP


Gord Dibben Excel MVP

On Thu, 8 Dec 2005 13:21:02 -0800, "finnplan"
wrote:

I am a new excel user.

I am doing a basic spread sheet. I would like to have cells formated so
that when I type in a number it automatically is negative and appears red.
Is this possible. I have not been able to ask "help" correctly to find it.

Thanks

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
automatically adjust numbers in a column when data is deleted Robbie Worksheet Functions 2 May 21st, 2005 01:57 AM
Convert positive numbers to negative Anita Worksheet Functions 7 July 21st, 2004 01:10 PM
formatting cells to show negative numbers Lew Neiman Worksheet Functions 2 July 4th, 2004 04:31 AM
Aligning bracketed negative numbers with positive numbers in a table Nicole B Tables 1 May 26th, 2004 06:10 AM
sum negative numbers Bernie Deitrick Worksheet Functions 3 May 25th, 2004 08:21 PM


All times are GMT +1. The time now is 03:59 PM.


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