copy formulas with workbook and sheet names as variables

cnfsdclrk

New Member
Joined
Jul 2, 2014
Messages
2
I have 138 Excel Workbooks with 12 sheets each. That’s 1656 sheets I need data from plus 4 totals from each, so in total I need 6624 formulas. The Sheets are named 1-12, and the workbook names are "Last name, First name." I need $J$15, $J$16, the sum of $J$15:$J$16, and $K$22 from each sheet.

I have created a separate excel to gather the data, but I’m not sure what formula to use to copy down because I’m not sure how to make the sheet name or the workbook name a variable. I started using the following formula, but I need a more efficient one.

='[Last name, First Name.xls]1'!$K$22

What formula should I use to automatically retrieve the data? Are there steps I can take to make this an easier process in the future?

Thanks for your help!
 

Excel Facts

What is the shortcut key for Format Selection?
Ctrl+1 (the number one) will open the Format dialog for whatever is selected.
*I want to copy the formula, changing the sheet name:

='[Last name, First Name.xls]1'!$K$22
='[Last name, First Name.xls]2'!$K$22
='[Last name, First Name.xls]3'!$K$22

As well as:

='[Last name, First Name.xls]1'!$K$22
='[Last name2, First Name2.xls]1'!$K$22
='[Last name3, First Name3.xls]1'!$K$22
 
Upvote 0

Forum statistics

Threads
1,223,228
Messages
6,170,875
Members
452,363
Latest member
merico17

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top