Sub ex()
Dim arr, c, x%
With Sheets("Sheet1")
Set c = .Range(.[c2], .[l2])
Set arr = .[c2].CurrentRegion
For x = 2 To arr.Rows.Count
If arr(x, 7) > arr(x, 8) And arr(x, 8) > arr(x, 9) Then Set c = Union(c, arr(x, 3).Resize(, 10))
Next
End With
c.Copy Sheets("工作表1").[a1]
End Sub作者: 准提部林 時間: 2020-11-16 11:54
If arr(x, 7) > arr(x, 8) And arr(x, 8) > arr(x, 9) And arr(x, 9) > arr(x, 10) Then Set c = Union(c, arr(x, 3).Resize(, 10))作者: peter95 時間: 2020-11-18 00:05
Option Explicit
Sub TEST()
Dim i&, xA As Range, xU As Range
Set xA = Range([Sheet1!L2], [Sheet1!C65536].End(3))
Set xU = xA(1)
For i = 2 To xA.Rows.Count
If (Val(xA(i, 5)) > Val(xA(i, 6))) * (Val(xA(i, 6)) > Val(xA(i, 7))) = 1 Then
Set xU = Union(xU, xA(i, 1))
End If
Next
Intersect(xU.EntireRow, [Sheet1!C:L]).Copy [工作表1!A1]
End Sub