I run a report every week and would like to cut the rows for a particular date range into a new worksheet (i.e. all rows with transactions between the 16th of one month to the 15th of the following month).
I'd like to cut all rows between 07/16 and 08/15 and past them in a new worksheet called "Aug" And cut all rows between 08/16 and 09/15 and past them in a new workseet called "Sept"
Example data
Column A - Column B - Column C
Post Date - Name - Vendor
07/25/10 - Wilson - Starbucks
08/05/10 - Wilson - American Airlines
08/14/10 - Guang - Apple Store
08/15/10 - McGee - Staples
08/17/10 - Curry - AT&T
09/02/10 - Johnson - Exxon
09/11/10 - Simms - Old Navy
Below is the VBA code I'm using but i'm getting an error on the red line......ANY SUGGESTIONS??????
Dim workingrow As Range
For Each workingrow In Sheets("Main").Rows
If (workingrow.Cells(1, 1).Value >= DateValue("7/16/2010")) And _
(workingrow.Cells(1, 1).Value <= DateValue("8/15/2010")) Then
workingrow.Copy (Sheets("Aug").Rows(1).End(xlDown).Offset(1, 0))
End If
Next workingrow
I'd like to cut all rows between 07/16 and 08/15 and past them in a new worksheet called "Aug" And cut all rows between 08/16 and 09/15 and past them in a new workseet called "Sept"
Example data
Column A - Column B - Column C
Post Date - Name - Vendor
07/25/10 - Wilson - Starbucks
08/05/10 - Wilson - American Airlines
08/14/10 - Guang - Apple Store
08/15/10 - McGee - Staples
08/17/10 - Curry - AT&T
09/02/10 - Johnson - Exxon
09/11/10 - Simms - Old Navy
Below is the VBA code I'm using but i'm getting an error on the red line......ANY SUGGESTIONS??????
Dim workingrow As Range
For Each workingrow In Sheets("Main").Rows
If (workingrow.Cells(1, 1).Value >= DateValue("7/16/2010")) And _
(workingrow.Cells(1, 1).Value <= DateValue("8/15/2010")) Then
workingrow.Copy (Sheets("Aug").Rows(1).End(xlDown).Offset(1, 0))
End If
Next workingrow