Home |
Search |
Today's Posts |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Hi Nick,
Thanks for the info. I do have a follow up question. I also have a summary worksheet that I use to summarize specific data from my detail worksheet. On my summary sheet I have a pull down list for my vendors. How could I write the code to only copy the rows from the detail sheet that match the vendor on my summary sheet? The pull down list is in cell B3 on my summary sheet. What I would want to happen is have the user click a command button and have it only copy the rows of data from the detail sheet that match that specific vendor in cell B3. The vendor name is on the detail sheet in column B. I have 9 columns on my detail sheet. I would want all those columns copied for the specified vendor. What do you think? SS "Nick Hodge" wrote: Secret Squirrel The trick is to copy it. The code below filters columnA for a value greater than 600, copies the column (You may want to limit this to the last cell in your data and the copies it to another sheet, Sheet2, starting in A1 Sub PasteFilteredRows() Range("A1").AutoFilter Field:=1, Criteria1:="600" Columns("A:A").Copy Destination:=Worksheets("Sheet2").Range("A1") End Sub -- HTH Nick Hodge Microsoft MVP - Excel Southampton, England DTHIS www.nickhodge.co.uk "Secret Squirrel" wrote in message ... I have a worksheet that I want to be able to cut and paste into a new file. But I only want to be able to cut and paste the filtered rows. How would I go about creating this macro/vba code to cut and paste only the rows that are filtered and create a new file with just these rows? |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
copy and paste filtered data | Excel Discussion (Misc queries) | |||
How to copy just the filtered data? | Excel Discussion (Misc queries) | |||
Copy auto filtered data | Excel Discussion (Misc queries) | |||
Copy filtered data | Excel Discussion (Misc queries) | |||
How do I copy a filtered subset of data to another worksheet? | Excel Discussion (Misc queries) |