Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default xlFilterCopy Help!!

I currently am working on a fairly large sheet where i want to extract/copy
data to another area using two different criterea. currently it seems to be
copying all the data. Any suggestions will be appreciated

Sub DataM()
Range("R1:Y2400").AdvancedFilter Action:=xlFilterCopy, CriteriaRange _
:=Range("AJ4:AK4"), CopyToRange:=Range("AG9:AN9"), Unique _
:=True
End Sub

--
Thanks,
VinceT
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default xlFilterCopy Help!!

:=Range("AJ4:AK4"),

I would expect to be at least 4 cells.

--
Regards,
Tom Ogilvy

"VinceT" wrote in message
...
I currently am working on a fairly large sheet where i want to

extract/copy
data to another area using two different criterea. currently it seems to

be
copying all the data. Any suggestions will be appreciated

Sub DataM()
Range("R1:Y2400").AdvancedFilter Action:=xlFilterCopy, CriteriaRange _
:=Range("AJ4:AK4"), CopyToRange:=Range("AG9:AN9"), Unique _
:=True
End Sub

--
Thanks,
VinceT



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default xlFilterCopy Help!!

Tom Thanks for your input. Yest the range for the criterea contains the
collumn headings and the specific data
--
Thanks,
VinceT


"Tom Ogilvy" wrote:

:=Range("AJ4:AK4"),

I would expect to be at least 4 cells.

--
Regards,
Tom Ogilvy

"VinceT" wrote in message
...
I currently am working on a fairly large sheet where i want to

extract/copy
data to another area using two different criterea. currently it seems to

be
copying all the data. Any suggestions will be appreciated

Sub DataM()
Range("R1:Y2400").AdvancedFilter Action:=xlFilterCopy, CriteriaRange _
:=Range("AJ4:AK4"), CopyToRange:=Range("AG9:AN9"), Unique _
:=True
End Sub

--
Thanks,
VinceT




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default xlFilterCopy Help!!

collumn headings and the specific data

Your criteria have only one row

--
Regards Ron de Bruin
http://www.rondebruin.nl


"VinceT" wrote in message ...
Tom Thanks for your input. Yest the range for the criterea contains the
collumn headings and the specific data
--
Thanks,
VinceT


"Tom Ogilvy" wrote:

:=Range("AJ4:AK4"),

I would expect to be at least 4 cells.

--
Regards,
Tom Ogilvy

"VinceT" wrote in message
...
I currently am working on a fairly large sheet where i want to

extract/copy
data to another area using two different criterea. currently it seems to

be
copying all the data. Any suggestions will be appreciated

Sub DataM()
Range("R1:Y2400").AdvancedFilter Action:=xlFilterCopy, CriteriaRange _
:=Range("AJ4:AK4"), CopyToRange:=Range("AG9:AN9"), Unique _
:=True
End Sub

--
Thanks,
VinceT






  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default xlFilterCopy Help!!

Range("A1:A21").AdvancedFilter Action:=xlFilterCopy,
CriteriaRange:=Range( _
"D1:E2"), CopyToRange:=Range("G1"), Unique:=True

worked for me as an example. My criteria range is two rows. If you have
an OR condition, then it should have more rows.

But you can't have a criteria range with 1 row.

--
Regards,
Tom Ogilvy

"VinceT" wrote in message
...
Tom Thanks for your input. Yest the range for the criterea contains the
collumn headings and the specific data
--
Thanks,
VinceT


"Tom Ogilvy" wrote:

:=Range("AJ4:AK4"),

I would expect to be at least 4 cells.

--
Regards,
Tom Ogilvy

"VinceT" wrote in message
...
I currently am working on a fairly large sheet where i want to

extract/copy
data to another area using two different criterea. currently it seems

to
be
copying all the data. Any suggestions will be appreciated

Sub DataM()
Range("R1:Y2400").AdvancedFilter Action:=xlFilterCopy, CriteriaRange _
:=Range("AJ4:AK4"), CopyToRange:=Range("AG9:AN9"), Unique _
:=True
End Sub

--
Thanks,
VinceT








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
xlfiltercopy and formatting Bob Excel Discussion (Misc queries) 0 November 2nd 09 07:03 PM


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

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"