Sub AA()
Sheet2.[A2:A65536].ClearContents
X = Sheet1.[A65536].End(xlUp).Row
Y = Sheet2.[A65536].End(xlUp).Row
For M = 2 To X
If Sheet1.Cells(M, 1) = Sheet1.Range("C1") Then
Sheet2.Cells(Y + 1, 1) = Sheet1.Cells(M, 1)
Y = Y + 1
End If
Next
End Sub作者: Hsieh 時間: 2019-2-12 15:53
Sub CopyFilter()
With Sheets("工作表1")
If Not .FilterMode Then Exit Sub
Sheets("工作表2").UsedRange.Clear
.AutoFilter.Range.Offset(1, 0).Copy [工作表2!A1]
End With
End Sub作者: cksmark129 時間: 2019-2-12 17:24