Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Multiple Workbook sums
Greetings all,
Sorry for posting this again. I am not sure I am explaining my situation clearly and have looked through my Excel 2002 Powerprogramming with VBA and I am still lost. Let me explain what I am trying to accomplish and then give some detailed examples. Employee's must fill out a sheet weekly on their activities. once they fill out their sheets, totals are calculated on another sheet (TOTALS) in their workbook in a range of cells from B2:P27. We are trying to compile their information into one master worksheet. All workbooks are exactly the same format. I am trying to create a sub that will start in cell B2 of the master and sum cell B2 from all the other workbooks. Then it will move to cell B3 and sum all Cell B3's from workbooks in the folder then it will go to B4, then B5, through P27 summing up cells in the USER##.xls workbooks in the folder All workbooks are named USER##.xls, where ## is the employee's user number. Is there a way to have it look at all files in the folder that begin with USER? Each week there can be a different number of user files in the folder. Some employees may be on vacation, and more employees may be hired so I am trying for something that is flexible enough to catch those situations. I am thinking I need to have variables that list the R1C1 notation and then when it is in a cell, it will open all USER##.xls workbooks, one by one, adding their value to a variable and when it gets to the last USER File, it will go to the next cell and do the same thing all over again until it finishes with cell P27. Example of 1st Weeks files in the folder master.xls User1.xls User2.xls User3.xls User7.xls User8.xls Example of 2nd week files in the folder master.xls User1.xls User3.xls User5.xls User6.xls User7.xls User9.xls User10.xls If someone could help I would certainly appreciate it. It has been a while since I did any VBA and while I have an idea of what I need to do, My mind is not letting me even start. Thanks in Advance Wally Steadman |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Sums with conditions and multiple columns | Excel Discussion (Misc queries) | |||
sumif with multiple sums | Excel Worksheet Functions | |||
adding multiple sums w/ different criteria | Excel Discussion (Misc queries) | |||
multiple entries-sums to different cells | Excel Worksheet Functions | |||
Excell will not add multiple sums together, what do I have turned. | Excel Discussion (Misc queries) |