Adding or subtracting numbers from a column
Richard,
Try this. As you type numbers in B1 - B10 they are added to any number in A1
- A10. You can change these ranges to suit.
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Cells.Count 1 Or IsEmpty(Target) Then Exit Sub
If Not Intersect(Target, Range("B1:B10")) Is Nothing Then
If IsNumeric(Target.Value) Then
Target.Offset(0, -1).Value = Target.Offset(0, -1).Value +
Target.Value
Target.Value = 0
End If
End If
End Sub
Mike
"Richard" wrote:
I would like to have a column of numbers and by typing in numbers in an
adjacent column add these numbers to the ones in the column. As the numbers
in the column change it would be nice if the ones I am typing in returned to
zero. If anyone knows haow to do this I will be impressed and grateful if
they tell me how.
Thank you
--
Richard
|