Selecting Filtered Items from Named range

  • Thread starter Thread starter Soniya
  • Start date Start date
S

Soniya

Hi all,

I have the following:
Column D data area is defined as "My List"
No I filter the sheet Field 4 (Mylist) and returns the
data based on crieteria
how can I select only those filtered items less Label to
copy to other column??

TIA
Soniya
 
Somiya,

Use SpecialCells with the visble cells qualifier

Range("myList").SpecialCells(xlCellTypeVisible).Copy
Destination:=Range("M1")


Change M1 to suit
 
Soniya,

if cells below list are blank anyway
shift down 1 row before specialcells method

Range("myList").Offset(1). _
SpecialCells(xlCellTypeVisible).Copy _
Destination:=Range("M1")

else you'll have to both offset and resize

Range("myList").Offset(1). _
Resize(Range("MyList").Rows.Count - 1). _
SpecialCells(xlCellTypeVisible).Copy _
Destination:=Range("M1")


keepITcool

< email : keepitcool chello nl (with @ and .) >
< homepage: http://members.chello.nl/keepitcool >
 
Back
Top