Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi David,
Something like this may work for you: Sub Tester01() Dim rngData As Range, RngCrit As Range Dim rngOutput As Range With ActiveWorkbook With .Sheets("Source Data") Set rngData = .Range("A1").CurrentRegion '<<CHANGE End With With .Sheets("Output") Set RngCrit = .Range("H1").CurrentRegion '<<CHANGE Set rngOutput = .Range("A1") '<<CHANGE End With .Sheets("Output").Activate rngData.AdvancedFilter Action:=xlFilterCopy, _ CriteriaRange:=RngCrit, _ CopyToRange:=rngOutput, _ Unique:=True End With End Sub Amend the sheet names and ranges to suit your needs. --- Regards, Norman "david shapiro" wrote in message ... Norman, Thanks for the suggestion. How would it work though with an advanced filter command such as: Sheets("source data").Select Range("A1:I2754").AdvancedFilter Action:=xlFilterInPlace, CriteriaRange:= _ Sheets("criteria").Range("A1:G5"), Unique:=False How do I incorporate the range codes you mentioned in that? Dave *** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How can change range to select active rows instead of :=Range("S10 | Excel Discussion (Misc queries) | |||
How do I change a range name back to the underlying data range? | Excel Worksheet Functions | |||
How do I change the range? | Excel Worksheet Functions | |||
Change range name | Excel Programming | |||
how to change range in VBA? | Excel Programming |