I have a worksheet with a unique number in column A "NumberList" and other columns of data. Autofiltering is on. I need to filter the worksheet on column 13, then copy the contents of displayed cells in column A to another worksheet.
In 2001, Dave provided an elegant response to a similar question, now in the archive, #12560:
Sub SetFilteredRange()
That code works perfectly except that it copies all columns of displayed data to Sheet2, but I need to copy only column A.
This might help:
Filter Sheet1 on column 13="Yes" 'there are 10 values
Select Column A
Copy Displayed cells from Column A
Paste values only at Sheet2, cell A5 'The 10 values will fill cells A5:A14
In 2001, Dave provided an elegant response to a similar question, now in the archive, #12560:
Sub SetFilteredRange()
Dim FilterRange As Range
'Offset 1 Row to exclude headings
Set FilterRange = ActiveSheet.UsedRange.Offset(1, 0) _
.SpecialCells(xlCellTypeVisible)
FilterRange.Copy Destination:=Sheets("Sheet2").Range("A1")
End Sub'Offset 1 Row to exclude headings
Set FilterRange = ActiveSheet.UsedRange.Offset(1, 0) _
.SpecialCells(xlCellTypeVisible)
FilterRange.Copy Destination:=Sheets("Sheet2").Range("A1")
That code works perfectly except that it copies all columns of displayed data to Sheet2, but I need to copy only column A.
This might help:
Filter Sheet1 on column 13="Yes" 'there are 10 values
Select Column A
Copy Displayed cells from Column A
Paste values only at Sheet2, cell A5 'The 10 values will fill cells A5:A14