D
dlashley
Hello, I have entered the code below and it works just great but my
problem is that at the end I add up the two accumulator cells but it
only works for one row how do I get it to work for all the rows? Thanks
in advance for any help given.
Dawn
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Cells.Count > 1 Then Exit Sub
If Target.Column = 3 Then
Target(1, 5).Value = Target(1, 5).Value + Target.Value
End If
If Target.Cells.Count > 1 Then Exit Sub
If Target.Column = 4 Then
Target(1, 5).Value = Target(1, 5).Value + Target.Value
End If
If Target.Cells.Count > 1 Then Exit Sub
If Target.Column = 5 Then
Target(1, 5).Value = Target(1, 5).Value + Target.Value
End If
If Target.Cells.Count > 1 Then Exit Sub
If Target.Column = 12 Then
Target(1, 5).Value = Target(1, 5).Value + Target.Value
End If
If Target.Cells.Count > 1 Then Exit Sub
If Target.Column = 13 Then
Target(1, 5).Value = Target(1, 5).Value + Target.Value
End If
If Target.Cells.Count > 1 Then Exit Sub
If Target.Column = 14 Then
Target(1, 5).Value = Target(1, 5).Value + Target.Value
End If
Dim x As Single
x = Range("G13").Value
Range("U13").Value = x + Range("P13").Value
End Sub
problem is that at the end I add up the two accumulator cells but it
only works for one row how do I get it to work for all the rows? Thanks
in advance for any help given.
Dawn
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Cells.Count > 1 Then Exit Sub
If Target.Column = 3 Then
Target(1, 5).Value = Target(1, 5).Value + Target.Value
End If
If Target.Cells.Count > 1 Then Exit Sub
If Target.Column = 4 Then
Target(1, 5).Value = Target(1, 5).Value + Target.Value
End If
If Target.Cells.Count > 1 Then Exit Sub
If Target.Column = 5 Then
Target(1, 5).Value = Target(1, 5).Value + Target.Value
End If
If Target.Cells.Count > 1 Then Exit Sub
If Target.Column = 12 Then
Target(1, 5).Value = Target(1, 5).Value + Target.Value
End If
If Target.Cells.Count > 1 Then Exit Sub
If Target.Column = 13 Then
Target(1, 5).Value = Target(1, 5).Value + Target.Value
End If
If Target.Cells.Count > 1 Then Exit Sub
If Target.Column = 14 Then
Target(1, 5).Value = Target(1, 5).Value + Target.Value
End If
Dim x As Single
x = Range("G13").Value
Range("U13").Value = x + Range("P13").Value
End Sub