Set Column Negative

  • Thread starter Thread starter Michael Laferriere
  • Start date Start date
M

Michael Laferriere

Hi Folks - I know how to convert positive numbers to negative. The multiply
by -1 works well if you have already entered the values. Is there a way to
force negative numbers in a specific column at the time of entry? Thanks.
 
Michael said:
Hi Folks - I know how to convert positive numbers to negative. The multiply
by -1 works well if you have already entered the values. Is there a way to
force negative numbers in a specific column at the time of entry? Thanks.

Would you want to use validation where entry < 0?

Beege
 
Beege - Not really ... I was just getting lazy, hoping there was way to
eliminate the need for me to type a negative sign.


Michael
 
Hi Folks - I know how to convert positive numbers to negative. The multiply
by -1 works well if you have already entered the values. Is there a way to
force negative numbers in a specific column at the time of entry? Thanks.

Michael,
if you want all values in a certain column, say A:A, become negative,
you can use the following event procedure:

Private Sub Worksheet_Change(ByVal Target As Range)
TargetCol = 1 'change column number here
If Target.Column = TargetCol Then
Target.Value = -Abs(Target.Value)
End If
End Sub

To install:
Right-click on the sheet-tab of the sheet in question. Choose View
COde. Paste the above code.

HTH
Kostis Vezerides
 
Back
Top