Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Macro to filter sheet and copy to another

Sub CopyData()
With Worksheets("sheet4")
.Range("A1").AutoFilter Field:=20, Criteria1:="Amended"
Set rng = .AutoFilter.Range
Set rng = rng.Offset(1, 0).Resize(rng.Rows.Count - 1)
Set rng1 = Intersect(rng, .Range("A:C,G:M,Q:S"))
rng1.Copy _
Destination:=Worksheets("Sheet2").Range("A1")
End With
End Sub


--
Regards,
Tom Ogilvy


"Gareth" wrote in message
...
I want to used AutoFilter to filter column T on Sheet1 for the word
'Amended'.

If there are any found, I would like to copy only certain columns to

Sheet2.

The columns are A:C, G:M, Q:S

Thanks in advance.

Gareth




Reply
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
Adv. Filter - Want to copy to inactive sheet Maki Excel Discussion (Misc queries) 7 January 20th 10 12:59 PM
Adv. Filter - Want to copy to inactive sheet Maki Excel Discussion (Misc queries) 1 January 12th 10 10:50 PM
Copy/filter data in a sheet from another sheet Sheikh Saadi Excel Discussion (Misc queries) 1 November 22nd 07 08:28 AM
Filter function; copy values to another sheet jgmiddel Excel Discussion (Misc queries) 0 April 24th 06 05:15 PM
'Copy to' Advance Filter depend only on sheet ID not start sheet Sandy Yates Excel Worksheet Functions 0 April 4th 06 03:48 AM


All times are GMT +1. The time now is 03:50 AM.

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

About Us

"It's about Microsoft Excel"