LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,069
Default Advanced Filters with Unions

I am having a challenge with the following code. It has an issue with the
advanced filter. Does anyone know if it is possible to apply an advanced
filter on a union of ranges?

Sub TestIt()
Dim r1 As Range, r2 As Range, myMultiAreaRange As Range
Worksheets("sheet1").Activate
Set r1 = Range("A4:A9")
Set r2 = Range("D4:E9")
Set myMultiAreaRange = Union(r1, r2)
'myMultiAreaRange.Select

myMultiAreaRange.AdvancedFilter Action:=xlFilterCopy, _
CriteriaRange:=ThisWorkbook.Sheets("Sheet1").Range ("R_Criteria"), _
CopyToRange:=ThisWorkbook.Sheets("Sheet1").Range(" H4:J4"), Unique:=False


End Sub

 
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
Advanced filters (+/-5%) Hotel_guy Excel Worksheet Functions 4 November 9th 08 07:13 AM
Advanced filters. Hector Excel Discussion (Misc queries) 0 May 22nd 08 01:16 PM
Advanced Filters CJLuke Excel Discussion (Misc queries) 2 March 22nd 07 09:05 AM
advanced filters jiwolf Excel Worksheet Functions 4 October 18th 05 06:08 PM
Advanced Filters Louise Excel Worksheet Functions 3 September 26th 05 11:57 AM


All times are GMT +1. The time now is 11:48 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"