Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Copy data to new worksheet based on date range

Status
Not open for further replies.

jeffm777

IS-IT--Management
Nov 10, 2009
108
US
Hello all. I'm developing a workbook that shows all inventory entered. I'm connecting to my system using an ODBC connection pulling all inventory into a single worksheet that refreshes automatically after 5 minutes or upon opening the workbook. What I want to do is seperate the data from the main inventory worksheet into seperate worksheets based on a date range. For example, I have a worksheet called Oct 2010 and I want to copy the data from the main into this worksheet if the date entered is between 10/1/2010 and 10/31/2010. Also, I want to do this for my fiscal year Oct 2010 thru Sep 2011 and have each worksheet automatically update itself when inventory is entered for that particular month in the main inventory worksheet.

Is there an easy way to accomplish this or would it be easier to build a query for each month?

Thanks in advance for any assistance!!!
 


PivotTable REPORT. Easy peasy!

Skip,

[glasses]Just traded in my old subtlety...
for a NUANCE![tongue]
 
Thanks Skip but is there an easier way besides building a pivot table for 12 worksheets? I've researched and found some VBA code that I think will work but I know very little about VBA coding. This is what I found...

Sheets("Main").Select
Range("$A:$J").Select
Selection.Copy
Sheets("Oct2010").Select
Range("$A:$J").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False

Can I use a variation of this to only copy based on a date range?
 


WHY would you put your report in 12 different tabs???

You can report on ANY SELECTED Values(s) in a PivotTable Report INTERACTIVELY!

I routinely do this with reports and charts. It is much easier to maintain ONE report or ONE chart than a multitude of them! Users can be 'trained' to select from a drop down, just as easily as they can select from a sheet tab. In fact, it is often much easier, when sheet scrolling might be required for HUNT and FIND a sheet tab.

Skip,

[glasses]Just traded in my old subtlety...
for a NUANCE![tongue]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top