Advertisement
Advertisement
| 05.22.2008 at 08:34AM PDT, ID: 23424813 |
|
[x]
Attachment Details
|
||
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: |
Private Sub SumVis(ByVal Target As Range, Target1 As Range)
Dim Total As Range
Dim Current As Range
Dim TTotal As Integer
Set Current = Intersect([K8:K70], Target)
Set Total = Intersect([L8:L70], Target1)
'If Current Is Nothing Then Exit Sub
Application.Volatile True 'Everytime a cell changes a calculation is made
For Each cel In Current.Cells
If cel = "" Then
Else
TTotal = cel + cel.Offset(0, 1)
Cells(Target1.Row, "L") = TTotal
SumVis = TTotal
End If
Next
End Sub
|