|
[广告] Excel易用宝 - 提升Excel的操作效率 · Excel / WPS表格插件 ★ 免费下载 ★ ★ 使用帮助★
Option Explicit
Sub test1()
Dim ar, br, i&, j&, p&, n&, r&, iPosCol&
With [A1].CurrentRegion
p = 2: iPosCol = 5
ar = .Resize(.Rows.Count + 1)
ReDim br(1 To UBound(ar), 0)
For i = 2 To UBound(ar) - 1
If ar(i + 1, 2) <> ar(p, 2) Then
n = 0
For j = p To i
If Val(ar(j, iPosCol)) > 80 Then n = n + 1
Next j
If n >= 7 Then r = r + 1: br(r, 0) = ar(p, 2)
p = i + 1
End If
Next i
Columns("Q").Clear
With [Q2].Resize(r)
.Value = br
.NumberFormatLocal = "yyyy-m-d"
End With
End With
End Sub
|
评分
-
1
查看全部评分
-
|