Home |
Search |
Today's Posts |
|
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Creating a database and PivotTable with a Macro
I need to create a master workbook that reads from several other workbooks each containing a single worksheet. The data from one week will need to be kept for the following week to be compared. I know that a database and a pivottable will probably be the best way to do this, but I'm not familiar enough with writing macros to know how to proceed. Any help would be great.
|
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Creating a database and PivotTable with a Macro
Dim sh as Worksheet
Dim wkbk as Workbook Dim i as Long, sPath as String Dim rng as Range Dim varr as Variant workbooks("Master.xls").Worksheets.Add set sh = Activesheet sPath = "C:\Myfolder\Myfiles\" varr = Array("bk1.xls", "bk2.xls", . . . , "bk7.xls") for i = lbound(varr) to ubound(varr) set wkbk = workbooks.open( sPath & varr(i)) set rng = sh.Cells(rows.count,1).End(xlup)(2) wkbk.Worksheets(1).Range("A1").Currentregion.Copy _ Destination:=rng wkbk.close Savechanges:=False Next -- Regards, Tom Ogilvy "sales26" wrote in message ... I need to create a master workbook that reads from several other workbooks each containing a single worksheet. The data from one week will need to be kept for the following week to be compared. I know that a database and a pivottable will probably be the best way to do this, but I'm not familiar enough with writing macros to know how to proceed. Any help would be great. |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Creating a database and PivotTable with a Macro
Try this:
http://msdn.microsoft.com/library/de...artreports.asp This one is good: http://www.microsoft.com/exceldev/articles/movs104.htm -- Toby Erkson Oregon, USA Excel 2002 in Windows XP "sales26" wrote in message ... I need to create a master workbook that reads from several other workbooks each containing a single worksheet. The data from one week will need to be kept for the following week to be compared. I know that a database and a pivottable will probably be the best way to do this, but I'm not familiar enough with writing macros to know how to proceed. Any help would be great. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Using Excel PivotTable for a huge DataBase from External Data | Excel Discussion (Misc queries) | |||
Creating a PivotTable w/o selecting data in an existing PivotTable | Excel Discussion (Misc queries) | |||
Addin for updating database by ammending pivottable | Excel Discussion (Misc queries) | |||
creating a database and database query | Excel Programming | |||
Pivottable database connections | Excel Programming |