I've never used advanced filter before except to filter out duplicates. Now I need to filter out duplicates and anything that has a 0 or a negative number and I'm hopelessly lost. I've attached an example worksheet.
Thanks for the help!
I've never used advanced filter before except to filter out duplicates. Now I need to filter out duplicates and anything that has a 0 or a negative number and I'm hopelessly lost. I've attached an example worksheet.
Thanks for the help!
Have a look at this
MVP (Excel 2008-2010)
Post a workbook with sample data and layout if you want a quicker solution.
To help indent your macros try Smart Indent
Please remember to mark threads 'Solved'
OOOHHHH! Now I get it! One more question, does the criteria range have to be on the worksheet or can it be somewhere else? I'll be looping through multiple workbooks and using the same criteria.
Thanks!
If you are using VBA, I think the Criteria range can be anywhere.
MVP (Excel 2008-2010)
Post a workbook with sample data and layout if you want a quicker solution.
To help indent your macros try Smart Indent
Please remember to mark threads 'Solved'
Both the Copy to Range (if copying to different location) and the Criteria range can be on different sheets (or different workbooks) than the List Range or each other.
When diriven by VBA, fully qualifying the various arguments of .AdvancedFiter will be sufficient.
From the keyboard:
The sheet of the Copy To Range must be active when AdvancedFilter is pressed.
If the copy to remote location option is not being used, the sheet with the Criteria Range must be active when AdvancedFilter is pressed.
If the wrong sheet is active, a misleading error message results.
As I mentioned above, when invoked from VBA, it doesn't matter which sheet is active.
Thank you!