Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help with copying from a filtered table

Status
Not open for further replies.

LGMan

MIS
Aug 27, 2003
233
GB
Hi, I've got a large table of data which contains zones, shops, thier sales figures and thier profit figures, My table is currently sorted by Profit (high to low), and I'm filtering the table by sales over £x, and then by one zone at a time.

My problem is that I need to copy the top 5 into another workbook. This I can do manually by copy and paste values, but how would I do it in VBA since the cell range, since the for one example the range is A1:D374
A1:D1 contains the column titles, so I need to copy these plus the next 5 rows from the filtered table
Thanks in advance
 
hi,

Copy the range.SpecialCells(xlCellTypeVisible)

PasteSpecial xlPasteValues the range into a temp sheet

Then copy the rows you want and paste into your target location

Skip,

[glasses]Just traded in my old subtlety...
for a NUANCE![tongue]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top