Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
ggant
 
Posts: n/a
Default Make cells negetive amount

I want to make any value that is put into a cell to be a negitive value. So
if 5.00 is put in it's value shows as negetive value. It this possible?
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Bob Phillips
 
Posts: n/a
Default Make cells negetive amount

This works on range H1:H10, change to suit

Private Sub Worksheet_Change(ByVal Target As Range)
Const WS_RANGE As String = "H1:H10"

On Error GoTo ws_exit:
Application.EnableEvents = False
If Not Intersect(Target, Me.Range(WS_RANGE)) Is Nothing Then
With Target
If .Value 0 Then .Value = -.Value
End With
End If

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.

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"ggant" wrote in message
...
I want to make any value that is put into a cell to be a negitive value.

So
if 5.00 is put in it's value shows as negetive value. It this possible?



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
CLR
 
Posts: n/a
Default Make cells negetive amount

If you only want the display to APPEAR to be negative, then you can just do a
custom format of -#### on the cell. The actual number tho, if used in
other formulas will be positive.

Vaya con Dios,
Chuck, CABGx3



"ggant" wrote:

I want to make any value that is put into a cell to be a negitive value. So
if 5.00 is put in it's value shows as negetive value. It this possible?

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 limit amount of numbers in cells in excel Jeff Excel Worksheet Functions 6 August 20th 08 04:03 PM
checking that cells have a value before the workbook will close kcdonaldson Excel Worksheet Functions 8 December 5th 05 04:57 PM
format row of cells to highlight least amount oceantravel Excel Worksheet Functions 1 October 3rd 05 09:55 PM
Make Alignment options under format cells available as shortcut dforrest Excel Discussion (Misc queries) 1 July 14th 05 10:58 PM
REPOST: How can I make the graph omit blank cells in the data set? easy Charts and Charting in Excel 2 March 17th 05 09:57 AM


All times are GMT +1. The time now is 05:09 PM.

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"