Some MS Excel Codes

Print article Email to friend
0.00

To make a column display positive currency as negative:
Right click on tab and choose view code.

Paste the code from between the lines below into the box and change the cell
references to suit

----------------------------------------------------------------------------------------

Private Sub Worksheet_Change(ByVal Target As Range)

Dim isect As Range
Set isect = Application.Intersect(Target, Range("A1:C20"))
If Not (isect Is Nothing) Then
If Target.Value > 0 Then Target.Value = 0 - Target.Value
End If

End Sub

--------------------------------------------------------------------------------------------

To hide fields with certain values like 0 from view:

Click on the home tab and choose conditional formatting.
Choose highlight cell rules and equal to: Enter 0 and colour in white or same
as cell backround colour.

Some MS Excel Codes

To make a column display positive currency as negative:
Right click on tab and choose view code.

Paste the code from between the lines below into the box and change the cell
references to suit

----------------------------------------------------------------------------------------

Private Sub Worksheet_Change(ByVal Target As Range)

Dim isect As Range
Set isect = Application.Intersect(Target, Range("A1:C20"))
If Not (isect Is Nothing) Then
If Target.Value > 0 Then Target.Value = 0 - Target.Value
End If

End Sub

--------------------------------------------------------------------------------------------

To hide fields with certain values like 0 from view:

Click on the home tab and choose conditional formatting.
Choose highlight cell rules and equal to: Enter 0 and colour in white or same
as cell backround colour.