B
Bernie Deitrick
Mark,
Where are you getting the +7 / - 6 ?
I'm still not sure what you want.
L is column 12.
M is column 13.
Q is column 17.
Target is the cell that was changed.
This code means:
' only do this is the cell that changed is in column L
If Target.Column = 12 Then
' Change the value in column Q
' by taking the original value in column Q
' and adding the value in column M
' all in the same row as the changed cell
Cells(Target.Row, 17).Value = _
Cells(Target.Row, 17).Value + _
Cells(Target.Row, 13).Value
End If
give an example of values in one row, and what you would type, with before and after values....
HTH,
Bernie
MS Excel MVP
ie: If L20 is 25 and I4 is 18 then M4 is +7 or 7
If L4 is 20 and I4 is 14 then M4 is -6
Where are you getting the +7 / - 6 ?
I'm still not sure what you want.
L is column 12.
M is column 13.
Q is column 17.
Target is the cell that was changed.
This code means:
' only do this is the cell that changed is in column L
If Target.Column = 12 Then
' Change the value in column Q
' by taking the original value in column Q
' and adding the value in column M
' all in the same row as the changed cell
Cells(Target.Row, 17).Value = _
Cells(Target.Row, 17).Value + _
Cells(Target.Row, 13).Value
End If
give an example of values in one row, and what you would type, with before and after values....
HTH,
Bernie
MS Excel MVP