|
[广告] Excel易用宝 - 提升Excel的操作效率 · Excel / WPS表格插件 ★ 免费下载 ★ ★ 使用帮助★
Option Explicit
Sub TEST2()
Dim ar, br, i&, j&, k&, n&
Application.ScreenUpdating = False
br = Sheets(1).[A1].CurrentRegion.Value
ar = [A1].CurrentRegion.Value
For i = 2 To UBound(ar)
ar(i, UBound(ar, 2)) = Empty
n = 0
For k = 2 To UBound(br)
If br(k, 3) = ar(i, 3) Then
For j = 3 To UBound(br, 2)
If br(k, j) = "达标" Then n = n + 1
Next j
End If
Next k
ar(i, UBound(ar, 2)) = n
Next i
[A1].CurrentRegion.Value = ar
Application.ScreenUpdating = True
Beep
End Sub |
评分
-
3
查看全部评分
-
|