Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Is it possible to use non-contiguous ranges with the vba code for advanced
filters? I can not get the example code to work. Example of code: Sub TestCode() On Error GoTo Err_Text Dim oWB As String Dim oJoinNewRng01 As Range oWB = Application.ActiveWorkbook.Name Set oJoinNewRng01 = Union(Workbooks(oWB).Sheets("Sheet1").Range("A10:A 14"), Range("E10:G14")) oJoinNewRng01.Select oJoinNewRng01.AdvancedFilter Action:=xlFilterCopy, _ CriteriaRange:=Workbooks(oWB).Sheets("Sheet1").Ran ge("Criteria"), _ CopyToRange:=Workbooks(oWB).Sheets("Sheet1").Range ("I10:L10"), _ Unique:=False Exit_Text: Exit Sub Err_Text: MsgBox Err.Number & " - " & Err.Description Resume Exit_Text End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Advanced Filter - Named Ranges | Excel Worksheet Functions | |||
advanced filter dialog box, "List Range" list two ranges? | Excel Worksheet Functions | |||
Advanced filter: criteria in non-adjacent ranges? | Excel Programming | |||
Advanced filter in VBA - criteria in non-adjacent ranges | Excel Programming | |||
Date ranges and advanced filter | Excel Programming |