-
Copy filtered data in new sheet and name it after criteria
Hello every One
I'm trying to make a code that will copy in a new sheet all the values filtered, and name the new sheet after all criteria used in filter
Here i attached my file.
the code can find the first criteria but not the second
Thanks for all help
-
I do not know what filter you have used. use "advance filter". see help under this.
-
Call the second sub from the first, passing the new sheet name.
[VBA]Sub Filter()
'........................
Filter_Create Crit1 & " " & crit2
End Sub
Sub Filter_Create(ShName)
'..........................
' Add a new worksheet to copy the filter results in.
Set WSNew = Worksheets.Add
WSNew.Name = ShName
'..........................
End Sub
[/VBA]
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'
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules