Negative number morphing to a cell code
The Event macro performs this action for cell B9:
Private Sub Worksheet_Change(ByVal Target As Range)
If Intersect(Target, Range("B9")) Is Nothing Then Exit Sub
If Target.Value 0 Then Exit Sub
v = Target.Value & "-"
Application.EnableEvents = False
Target.Value = v & Target.Address(RowAbsolute:=False, ColumnAbsolute:=False)
Application.EnableEvents = True
End Sub
modify it to change or include more cells.
--
Gary''s Student - gsnu2007
"nickra" wrote:
I know this is probably an easy one, but I can't find the right
button. Every time I type, say, -3, into a cell, it turns into -3 and
then adds the cell wherever my cursor is, like L11. So, I get 3+L11 in
the cell instead of -3. What do I need to do? It's gotta be simple, I
know.
|