Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
urgent - changing a range
Hi,
A bit urgent - Does anyone know why this isn`t working? The code is to do an advanced filter taking the full range of data in a worksheet? If possible, I`d like to alter it to put the results of the filter in a new sheet. Thanks. Dave "source data" - the main file which is being filtered from. "criteria file" - the criteria for the filter Dim rngData As Range, RngCrit As Range Dim rngOutput As Range With ActiveWorkbook With .Sheets("source data") Set rngData = .Range("A1").CurrentRegion ' End With With .Sheets("criteria file") Set RngCrit = .Range("A1").CurrentRegion ' Set rngOutput = .Range("A1") End With .Sheets("criteria file").Activate rngData.AdvancedFilter Action:=xlFilterCopy, _ CriteriaRange:=RngCrit, _ CopyToRange:=rngOutput, _ Unique:=True End With *** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it! |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Changing the range for averages with out changing the formula. | Excel Worksheet Functions | |||
Range formula - urgent! | Excel Discussion (Misc queries) | |||
URGENT: How to prevent data in cells from changing? | Excel Discussion (Misc queries) | |||
Urgent Dynamic Range with Vlookup | Excel Discussion (Misc queries) | |||
Urgent, help needed on range selection! | Excel Programming |