Filter, CopyVisible, Paste into Sheet 2

boxboy30

Board Regular
Joined
Sep 16, 2011
Messages
84
I would like to filter my month. Copy all the information from that month in to a sheet....so by the end of the job I have 13 sheets in one workbook. Any Ideas?
 

Excel Facts

Pivot Table Drill Down
Double-click any number in a pivot table to create a new report showing all detail rows that make up that number
Sure, record a macro for the first sheet, then post back what you get. Provided the sheets are formatted the same, then someone can easily add some code to include each worksheet and make the pasting sequential.
 
Upvote 0
Sub Parse_By_Month()
'
' Parse_By_Month Macro
' Parses the information out by Month then pastes that information into it's own sheet, while keeping the main information.
Columns("D:D").Select
ActiveWorkbook.Worksheets(1).Sort.SortFields.Clear
ActiveWorkbook.Worksheets(1).Sort.SortFields.Add Key:=Range("D1"), SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:=xlSortNormal
With ActiveWorkbook.Worksheets("Project Query 2011").Sort
.SetRange Range("A1:G44285")
.Header = xlYes
.MatchCase = False
.Orientation = xlTopToBottom
.SortMethod = xlPinYin
.Apply
End With
Selection.AutoFilter
ActiveSheet.Range("$D$1:$D$44285").AutoFilter Field:=1, Criteria1:=Array("="), Operator:=xlFilterValues, Criteria2:=Array(1, "1/29/2011")
Range("A1:G3594").Select 'needs to refer to last row
Selection.Copy
Sheets.Add After:=Sheets(Sheets.Count)
ActiveSheet.Paste
Sheets("Sheet1").Select
Sheets("Sheet1").Name = "January Projects"
End Sub


now how do i loop this
 
Upvote 0

Forum statistics

Threads
1,224,567
Messages
6,179,571
Members
452,927
Latest member
whitfieldcraig

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top