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: 24
Default Defining range for Advanced Filter

I'm having a difficult time on the range definition for and andvanced
filter callout, below is my code todate. The issue occurs on the Set
oRange line, as I step through the macro it appear to highlight the
appropriate cells but I get a "Run time Error #424 Object required",
can anyone help me out.

Sub Macro2()
'
' Macro2 Macro
' Macro recorded 2/9/2006 by jreid
'

'
Dim oRange As Object

Range("AJ3").Select
Range(Selection, Selection.End(xlDown)).Select
Selection.Copy
Range("DT3").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False

Range("M3").Select
Range(Selection, Selection.End(xlDown)).Select
Selection.Copy
Range("DU3").Select
ActiveSheet.Paste
Range("DT3").Select
Range(Selection, Selection.End(xlToRight)).Select
Range(Selection, Selection.End(xlDown)).Select
Selection.Sort Key1:=Range("DT3"), Order1:=xlAscending,
Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortTextAsNumbers
Range("DT3").Select
Cells.Find(What:="1X", After:=ActiveCell, LookIn:=xlFormulas,
LookAt:= _
xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext,
MatchCase:=False _
, SearchFormat:=False).Activate
ActiveCell.Offset(0, 1).Select

Set oRange = ActiveSheet.Range(Selection,
Selection.End(xlDown)).Select
oRange.AdvancedFilter Action:=xlFilterCopy, CopyToRange:= _
Range("DW3"), Unique:=True

Range(Selection, Selection.End(xlDown)).Select
Selection.Copy
Sheets("Sheet1").Select
Range("B1").Select
ActiveSheet.Paste
Range("A1").Select
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 filter a range Il Principe Excel Worksheet Functions 2 August 1st 05 03:27 PM
Advanced filter and Criteria Range gearoid Excel Discussion (Misc queries) 2 July 20th 05 02:33 PM
"Criteria Range" in the "Data/Filter/Advanced Filter" to select Du TC Excel Worksheet Functions 1 May 12th 05 02:06 AM
Advanced Filter Range Selection in VB Hulk[_2_] Excel Programming 0 October 3rd 04 02:39 AM
Advanced Filter Range Selection in VB Hulk Excel Programming 1 October 3rd 04 02:26 AM


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