有人知道如果这是真的,每次只能获取前100个结果行吗?:
=COUNTIFS(R2C9:R50000C9,RC[-1])>30?
我有一张包含9列A-I
的工作表。 I
列Amount
的值为1-1600 kg
且仅增加。在某些时候保持稳定超过30秒。我想在数量稳定时收集这些数据,但我只需要每次数量稳定时的前100行。当条件为True
时,我不想只有前100行,因为这样,当量(“I”)稳定时,它只给出了我第一次的100行。
提前谢谢。
这是我的代码:
Sub philoly_3()
'
' philoly_3 Macro
'
Sheets("Graph data").Select
Range("J1").Select
Selection.NumberFormat = "0.00"
ActiveCell.FormulaR1C1 = "Criteria"
Range("J2").Select
ActiveCell.FormulaR1C1 = "=COUNTIFS(R2C9:R50000C9,RC[-1])>30"
Range("J2").Select
Selection.AutoFill Destination:=Range("J2:J50000")
Range("J2:J50000").Select
Range("A1").Select
Range(Selection, Selection.End(xlToRight)).Select
Selection.Style = "Input"
Range("F2").Select
With ActiveWindow
.SplitColumn = 0
.SplitRow = 1
End With
ActiveWindow.FreezePanes = True
Selection.AutoFilter
ActiveSheet.Range("$A$1:$J$50000").AutoFilter Field:=10, Criteria1:="TRUE"
Range("A1").Select
Range(Selection, Selection.End(xlToRight)).Select
Range("A1:I1").Select
Range(Selection, Selection.End(xlDown)).Select
Selection.Copy
Sheets("All moments").Select
ActiveSheet.Paste
Cells.Select
Cells.EntireColumn.AutoFit
Range("F2").Select
With ActiveWindow
.SplitColumn = 0
.SplitRow = 1
End With
ActiveWindow.FreezePanes = True
Sheets("All moments").Select
Application.CutCopyMode = False
Sheets("All moments").Move Before:=Sheets(1)
Sheets("Graph data").Select
ActiveSheet.Range("$A$1:$J$50000").AutoFilter Field:=10
Range("I50000").Select
Selection.End(xlUp).Select
Range("I2").Select
Selection.AutoFilter
Columns("J:J").Select
Selection.Delete Shift:=xlToLeft
Range("B2").Select
philoly_11
End Sub