|
Sub 数据提取()
Dim ar As Variant
Dim br()
Dim sh As Worksheet
ReDim br(1 To 50000, 1 To 5)
For Each sh In Sheets
If sh.Index > 1 Then
r = sh.Cells(Rows.Count, 1).End(xlUp).Row
ar = sh.Range("a1:e" & r)
For s = 1 To 3
zd = Application.Large(Application.Index(ar, 0, 3), s)
For i = 1 To UBound(ar)
If ar(i, 3) = zd Then
n = n + 1
For j = 1 To UBound(ar, 2)
br(n, j) = ar(i, j)
Next j
Exit For
End If
Next i
Next s
End If
Next sh
With Sheets("large")
.[a1].CurrentRegion.Offset(1).Clear
.[a2].Resize(n, UBound(br, 2)) = br
End With
MsgBox "ok!"
End Sub
|
评分
-
1
查看全部评分
-
|