One way. Right click on sheet tab>view code>insert this
As written it is working on column M which is col 13 for col N
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Column <> 13 Then Exit Sub
If UCase(Target) = "D" Then _
Target.Offset(, 1).Value = _
Abs(Target.Offset(, 1))
If UCase(Target) = "C" And _
Left(Target.Offset(, 1), 1) <> "-" _
Then Target.Offset(, 1).Value = _
"-" & Target.Offset(, 1)
End Sub
Cindy B. said:
I have two coloumns - one alpha, and one a numeric value. The first
column contains either a "D" or a "C" and indicates whether the
corresponding number in the adjacent column should be positive or negative.
I would like to convert the numbers to negative, where needed, based on the
code in the first column. Is there any way to do this with a formula?