I am trying to create a sheet that opens a workbook...the name of that workbook is a calculated name, and pull data from a fixed cell, then close the sheet and move to the next workbook..ending up with a table of pulled data.
For example,
A B C D E F
1 TS160515 TS160508 TS160501 TS160424 TS160417
2 Emp1
3 Emp2
4 Emp3
5 Emp4
6 Emp5
Cells B1,C1,D1 etc are calculated. The file name is the data in cell A2 + B1. In ths case: TS160515Emp1. I need to open that sheet name, grab data from cell d20 and put it in B2, then close the sheet and open the next sheet which is named A2 + c1, D1, etc. Repeating that procedure...open that sheet, grab D20 and close the sheet.
So I will end up with a table of data pulled from those sheets.
A B C D E F
1 TS160515 TS160508 TS160501 TS160424 TS160417
2 Emp1 $15.00 $20.00 $15.50 $27.00 $14.20
3 Emp2
4 Emp3
5 Emp4
6 Emp5
I am trying:
Workbooks.Open Filename:= _
"B:\dataSheets\Costing\TS160320Emp1.xlsm"
Range("D20").Select
ActiveWindow.Close
End Su
But i keep generating an error.
Forgive me if this sounds like it should be easy. I haven't created a sheet for a couple of years and during that time I had a stroke which seems to be throwing me off on some things that should be simple.
Thanks
For example,
A B C D E F
1 TS160515 TS160508 TS160501 TS160424 TS160417
2 Emp1
3 Emp2
4 Emp3
5 Emp4
6 Emp5
Cells B1,C1,D1 etc are calculated. The file name is the data in cell A2 + B1. In ths case: TS160515Emp1. I need to open that sheet name, grab data from cell d20 and put it in B2, then close the sheet and open the next sheet which is named A2 + c1, D1, etc. Repeating that procedure...open that sheet, grab D20 and close the sheet.
So I will end up with a table of data pulled from those sheets.
A B C D E F
1 TS160515 TS160508 TS160501 TS160424 TS160417
2 Emp1 $15.00 $20.00 $15.50 $27.00 $14.20
3 Emp2
4 Emp3
5 Emp4
6 Emp5
I am trying:
Workbooks.Open Filename:= _
"B:\dataSheets\Costing\TS160320Emp1.xlsm"
Range("D20").Select
ActiveWindow.Close
End Su
But i keep generating an error.
Forgive me if this sounds like it should be easy. I haven't created a sheet for a couple of years and during that time I had a stroke which seems to be throwing me off on some things that should be simple.
Thanks
Last edited: