Jeff DigiTech


I have a master Excel file named (master.xls) and other slave files called ( slave1.xls, slave2.xls, slave3.xls ....salve5.xls and so on. )

master's structure is exactly the same as other of other salves where they all contain a number in cell A1

master will first select the slaves.
And master wants to calculate the sum of A1(s) in slaves and have the result put in B1 of master.xls

getting A1(s) from slaves may open and close slaves, however I want to have the open and close done in background.

How can I do it









Re: Getting data from other workbooks

ADG


Hi

Would it not be simpler to put a formula in cell B2 referencing the cells in the Slave sheets






Re: Getting data from other workbooks

Jeff DigiTech

But if I want to do it in marco

Actually the actual problem I face is:-

I have workbooks that stores the $ earned by different persons in one particular day.

like this

$ earn
John 120
May 101
Peter 140

One would pick any one of the workbook as a master, and have a button to click such that I can select the slaves.

The maro will open those slave ( IN BACKGROUND ), and sum up all files ( slaves + master ) , and put the result in the master such that the master store the total $ earned of each person.

How can I do it






Re: Getting data from other workbooks

ADG

Hi

Have a look at Andy Popes answer to How do i reference a cell in an unopened workbook in this forum this might help. The approach uses a working cell in the current book.





Re: Getting data from other workbooks

Jeff DigiTech

thanks ...
what if i want to get a range ( rectanglular block of cells ) from other workbook