Microsoft Office Questions? Ask a IT Expert for Support ASAP
an example would be if we had the macro file and 4 other files in the folder.
the files are East, West, North and South
Each one of the files has a sheet(tab) called "Data"
on the "Data" sheet is the word "North" (or south etc) in cell C2
The macro file has 4 sheets (tabs) - Norht, South, East & West.
Hopefully, the macro will open the 1st file, match the cell reference to a tab and copy the data!
My mistake. I don't think I explained properly.
Please see the zip file http://wikisend.com/download/273508/JA2.rar
It needs to match the name in cell C2 to the sheet name. Thats the only way it knows which sheet to paste the data to
Hi, the macro does not work "Object Defined Error"
Also, I cannot see in the macro script how it knows which tab to paste the data
Am I missing something?
Thanks so much for your patience on this.
I have corrected the path and the ,macro runs now
Could you help me do this? I just need to see some data copy over from the north spreadsheet to the north tab, but am not very good at this.
Not yet giving me what I need. It needs to ref the cell to get the sheet name. Reason is because there will be loads of files. You have it hardcoded in the macro.
I could not see where to put the file path name either
The aim is to copy the data from many files to one main file.
For each file, there is a corresponding tab in the main file
In the file called North, there is the word "North" in cell C2. The macro needs to reference that cell and only that cell to know that all the data from the North file should be copied to the tab called North in the macro file.
I know this is painfull but we will get there!
I can see what your file is doing now. But there are a couple of things I'm not sure about.
It only seems to copy the word North (I tried to get it to copy more than the word, like the whole page but it would not work)
It has "North" hard coded in the script. This would mean copying the statements for each file. I thought a loop would be better, hence why it should read the name from the "North" file
I hope I can get it sorted