C
Cimjet
I repost to make it more clear, I hope.
This works great.
Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)
Dim sz As Variant, t As Long
Dim vn As Integer
For vn = 1 To Worksheets.Count
Next
For Each sz In _
Array("$B$6:$AF$17", "$B$21:$AF$32", "$B$36:$AF$47")
t = t + _
Application.WorksheetFunction.CountIf(Range(sz), "V")
Next
Range("I51") = t
End Sub
---------------------
But I need something like this :
Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)
Dim sz As Variant, t As Long
Dim vn As Integer
For vn = 1 To Worksheets.Count
Next
For Each sz In _
Array("$B$6:$AF$17", "$B$21:$AF$32", "$B$36:$AF$47")
t = t + _
Application.WorksheetFunction.CountIf(Range(sz), "V")
tt = tt + _
Application.WorksheetFunction.CountIf(Range(sz), "½V")
s = s + _
Application.WorksheetFunction.CountIf(Range(sz), "i")
ss + ss + _
Application.WorksheetFunction.CountIf(Range(sz), "½i")
Next
Range("I51") = t
Range("I50") = tt
Range("I52") = s
Range("I53") = ss
________________
Obviously that don't work, can anyone help me with this
End Sub
This works great.
Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)
Dim sz As Variant, t As Long
Dim vn As Integer
For vn = 1 To Worksheets.Count
Next
For Each sz In _
Array("$B$6:$AF$17", "$B$21:$AF$32", "$B$36:$AF$47")
t = t + _
Application.WorksheetFunction.CountIf(Range(sz), "V")
Next
Range("I51") = t
End Sub
---------------------
But I need something like this :
Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)
Dim sz As Variant, t As Long
Dim vn As Integer
For vn = 1 To Worksheets.Count
Next
For Each sz In _
Array("$B$6:$AF$17", "$B$21:$AF$32", "$B$36:$AF$47")
t = t + _
Application.WorksheetFunction.CountIf(Range(sz), "V")
tt = tt + _
Application.WorksheetFunction.CountIf(Range(sz), "½V")
s = s + _
Application.WorksheetFunction.CountIf(Range(sz), "i")
ss + ss + _
Application.WorksheetFunction.CountIf(Range(sz), "½i")
Next
Range("I51") = t
Range("I50") = tt
Range("I52") = s
Range("I53") = ss
________________
Obviously that don't work, can anyone help me with this
End Sub