Sub newtest()
Dim x As Long
Dim ws As Worksheet
For Each ws In ActiveWorkbook.Worksheets
ws.Select
If ws.Name = "KTPT80T" Then
x = ws.Range("G" & Rows.count).End(xlUp).Row
If x > 100 Then x = 100
Range("Z2") = Application.WorksheetFunction.CountIf(Range("G5:G" & x), "Y")
x = 0
ElseIf ws.Name = "KTPTZIT" Then
x = ws.Range("H" & Rows.count).End(xlUp).Row
If x > 100 Then x = 100
Range("Z10") = Application.WorksheetFunction.CountIf(Range("H5:H" & x), "Y")
x = 0
ElseIf ws.Name = "TABF10" Then
x = ws.Range("F" & Rows.count).End(xlUp).Row
If x > 100 Then x = 100
Range("Z11") = Application.WorksheetFunction.CountIf(Range("F5:F" & x), "Y")
x = 0
ElseIf ws.Name = "TABF125" Then
x = ws.Range("G" & Rows.count).End(xlUp).Row
If x > 100 Then x = 100
Range("Z12") = Application.WorksheetFunction.CountIf(Range("G5:M" & x), "Y")
x = 0
ElseIf ws.Name = "TABF126" Then
x = ws.Range("G" & Rows.count).End(xlUp).Row
If x > 100 Then x = 100
Range("Z13") = Application.WorksheetFunction.CountIf(Range("G5:K" & x), "Y")
x = 0
ElseIf ws.Name = "TABF15" Then
x = ws.Range("F" & Rows.count).End(xlUp).Row
If x > 100 Then x = 100
Range("Z14") = Application.WorksheetFunction.CountIf(Range("F5:BC" & x), "Y")
x = 0
ElseIf ws.Name = "TABF2" Then
x = ws.Range("G" & Rows.count).End(xlUp).Row
If x > 100 Then x = 100
Range("Z16") = Application.WorksheetFunction.CountIf(Range("G5:BD" & x), "Y")
x = 0
ElseIf ws.Name = "TABF3" Then
x = ws.Range("G" & Rows.count).End(xlUp).Row
If x > 100 Then x = 100
Range("Z17") = Application.WorksheetFunction.CountIf(Range("G5:AE" & x), "Y")
x = 0
ElseIf ws.Name = "TABFR113" Then
x = ws.Range("G" & Rows.count).End(xlUp).Row
If x > 100 Then x = 100
Range("Z20") = Application.WorksheetFunction.CountIf(Range("G5:M" & x), "Y")
x = 0
ElseIf ws.Name = "TABFR73" Then
x = ws.Range("J" & Rows.count).End(xlUp).Row
If x > 100 Then x = 100
Range("Z26") = Application.WorksheetFunction.CountIf(Range("J5:J" & x), "Y")
x = 0
ElseIf ws.Name = "TABFR77" Then
x = ws.Range("E" & Rows.count).End(xlUp).Row
If x > 100 Then x = 100
Range("Z27") = Application.WorksheetFunction.CountIf(Range("E5:E" & x), "Y")
x = 0
ElseIf ws.Name = "TABFT281" Then
x = ws.Range("F" & Rows.count).End(xlUp).Row
If x > 100 Then x = 100
Range("Z29") = Application.WorksheetFunction.CountIf(Range("F5:L" & x), "Y")
x = 0
ElseIf ws.Name = "TABF282" Then
x = ws.Range("E" & Rows.count).End(xlUp).Row
If x > 100 Then x = 100
Range("Z30") = Application.WorksheetFunction.CountIf(Range("E5:L" & x), "Y")
x = 0
ElseIf ws.Name = "TABFT283" Then
x = ws.Range("H" & Rows.count).End(xlUp).Row
If x > 100 Then x = 100
Range("Z31") = Application.WorksheetFunction.CountIf(Range("H5:N" & x), "Y")
x = 0
ElseIf ws.Name = "TABF284" Then
x = ws.Range("I" & Rows.count).End(xlUp).Row
If x > 100 Then x = 100
Range("Z32") = Application.WorksheetFunction.CountIf(Range("I5:O" & x), "Y")
x = 0
ElseIf ws.Name = "TABFT6" Then
x = ws.Range("F" & Rows.count).End(xlUp).Row
If x > 100 Then x = 100
Range("Z34") = Application.WorksheetFunction.CountIf(Range("F5:F" & x), "Y")
x = 0
ElseIf ws.Name = "TABF9" Then
x = ws.Range("F" & Rows.count).End(xlUp).Row
If x > 100 Then x = 100
Range("Z38") = Application.WorksheetFunction.CountIf(Range("F5:F" & x), "Y")
x = 0
ElseIf ws.Name = "TABFR127" Then
x = ws.Range("G" & Rows.count).End(xlUp).Row
If x > 100 Then x = 100
Range("Z22") = Application.WorksheetFunction.CountIf(Range("G5:G" & x), "A")
x = 0
ElseIf ws.Name = "TABFT5" Then
x = ws.Range("G" & Rows.count).End(xlUp).Row
If x > 100 Then x = 100
Range("Z33") = Application.WorksheetFunction.CountIf(Range("G5:G" & x), "G")
x = 0
End If
Next ws
End Sub