LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 172
Default Copy filtered data

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
copy and paste filtered data Churley Excel Discussion (Misc queries) 6 September 4th 07 04:17 PM
How to copy just the filtered data? ljCharlie Excel Discussion (Misc queries) 3 February 16th 07 06:38 PM
Copy auto filtered data edinclimb Excel Discussion (Misc queries) 0 January 3rd 06 06:36 PM
Copy filtered data Hans Knudsen Excel Discussion (Misc queries) 3 November 25th 05 01:29 PM
How do I copy a filtered subset of data to another worksheet? sftwrqn Excel Discussion (Misc queries) 2 June 30th 05 02:17 PM


All times are GMT +1. The time now is 08:26 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"