|
[广告] Excel易用宝 - 提升Excel的操作效率 · Excel / WPS表格插件 ★ 免费下载 ★ ★ 使用帮助★
红色这句改一下
Sub test()
Set d = CreateObject("scripting.dictionary")
t = [{100,90,80,70,60,50}]
ar = Range("a1").CurrentRegion
ReDim br(1 To UBound(ar) * 2, 1 To UBound(t))
For i = 2 To UBound(ar)
For x = 1 To UBound(t)
If ar(i, 3) >= t(x) / 100 Then
d(x) = d(x) + 1
br(d(x), x) = ar(i, 1)
d(x) = d(x) + 1
br(d(x), x) = ar(i, 2)
Exit For
End If
Next
Next
Range("e2").Resize(UBound(ar), UBound(br, 2)) = br
For j = 5 To UBound(t) + 4
Columns(j).Sort Cells(2, j), Header:=xlYes
Next
End Sub |
评分
-
1
查看全部评分
-
|