#1   Report Post  
Junior Member
 
Posts: 1
Default VBA Filter

Right, im no novice, but im way short of being able to sort this little issue out on my jack jones.

Ive got a excel ss that has 80 lines of information and each line is reportable to one of 20 different people, I need VBA to to pull together all the lines that have the reportable name at the end of the line, eg EntriesErrorsEntriesHash TotalManager1000Jo Blogs
I need VBA to match all the names together and then dump into a new workbook, then save the file as the name in cell N2. the below is what ive come up with so far, but im lost on how i can get the VBA to select the new name from the filter list.

Sub copydata()
ActiveSheet.Range("$A$1:$N$419").AutoFilter Field:=14, Criteria1:= _
"Jo Blogs"
Cells.Select
Range("B1").Activate
Selection.Copy
Workbooks.Add
ActiveSheet.Paste
Range("N2").Select
Application.CutCopyMode = False
Selection.Copy
Application.CutCopyMode = False
Selection.Copy
Application.CutCopyMode = False
ActiveCell.FormulaR1C1 = "Jo Blogs"
ActiveWorkbook.SaveAs Filename:= _
"hidden"", _
ReadOnlyRecommended:=False, CreateBackup:=False
Cells.Select
Selection.ClearContents
Windows("Drubs.xls").Activate


End Sub
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,522
Default VBA Filter

On Wednesday, October 24, 2012 9:18:29 AM UTC-5, Fleetzy wrote:
Right, im no novice, but im way short of being able to sort this little

issue out on my jack jones.



Ive got a excel ss that has 80 lines of information and each line is

reportable to one of 20 different people, I need VBA to to pull together

all the lines that have the reportable name at the end of the line, eg

EntriesErrorsEntriesHash TotalManager1000Jo Blogs

I need VBA to match all the names together and then dump into a new

workbook, then save the file as the name in cell N2. the below is what

ive come up with so far, but im lost on how i can get the VBA to select

the new name from the filter list.



Sub copydata()

ActiveSheet.Range("$A$1:$N$419").AutoFilter Field:=14, Criteria1:= _



"Jo Blogs"

Cells.Select

Range("B1").Activate

Selection.Copy

Workbooks.Add

ActiveSheet.Paste

Range("N2").Select

Application.CutCopyMode = False

Selection.Copy

Application.CutCopyMode = False

Selection.Copy

Application.CutCopyMode = False

ActiveCell.FormulaR1C1 = "Jo Blogs"

ActiveWorkbook.SaveAs Filename:= _

"hidden"", _

ReadOnlyRecommended:=False, CreateBackup:=False

Cells.Select

Selection.ClearContents

Windows("Drubs.xls").Activate





End Sub









--

Fleetzy


Can't tell what you need without seeing. Send this msg, your file and complete expalanation to dguillett @gmail.com
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 178
Default VBA Filter

I had this same issue that I needed help with several years ago. Ron De Bruin helpe me immensely. He has a webpage article detailing how to do exactly this (using entries in a specific column, create new workbooks or worksheets based on unique values).

http://www.rondebruin.nl/copy5.htm
Reply
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
Filter PivotTable dropdown items to match report filter Catherine D Excel Discussion (Misc queries) 1 August 16th 08 12:12 AM
Copy only visible cells after filter is applied/ sum after filter MAM Excel Worksheet Functions 0 April 9th 08 04:09 AM
filter: how to print filter list options in dropdown box help please Excel Discussion (Misc queries) 2 October 17th 07 01:53 AM
Need macro to filter, create tab on filter and copy/paste Jen[_11_] Excel Programming 1 May 2nd 06 04:45 PM
"Criteria Range" in the "Data/Filter/Advanced Filter" to select Du TC Excel Worksheet Functions 1 May 12th 05 02:06 AM


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