Sub TEST()
Dim Frng As Range, xE As Range
If Sheets("Sheet1").FilterMode = False Then MsgBox "尚未執行篩選": Exit Sub
Set Frng = Sheets("Sheet1").AutoFilter.Range.Offset(1, 0)
Set Frng = Frng.SpecialCells(xlCellTypeVisible).Rows(1)
Set xE = Sheets("Sheet2").Cells(Rows.Count, 1).End(xlUp)
If xE.Row = 1 Or xE <> "" Then Set xE = xE(2)
Frng.Copy xE
End Sub作者: peter95 時間: 2018-4-13 13:11
Sub TEST()
Dim Frng As Range, xE As Range
If Sheets("Sheet1").FilterMode = False Then MsgBox "尚未執行篩選": Exit Sub
Set Frng = Sheets("Sheet1").AutoFilter.Range.Offset(1, 0)
Set Frng = Frng.SpecialCells(xlCellTypeVisible).Rows(1)