Using Cell References as variables to index(match) in files

jocoop

New Member
Joined
Oct 20, 2006
Messages
4
Hello All,
I have recently incoroprated the index(match) to pull from reports on the server. The formula works very well, but due to the sheer number of applications, I would like to take my index(match) formula, stick variables in for Workbook Name and Tab Name, and then just paste the formula anywhere I want, and change reference cells. I tried to concatenate it, but it put the file path in quotes. Here is what I am working with:

=INDEX('\\Sdc-svr1\staffplan\[Customer Staff Plan.xls]Customer Detail'!$A$1:$CN$1000,MATCH($C24,'\\Sdc-svr1\staffplan\[Customer Staff Plan.xls]Customer Detail'!$A$1:$A$1000,0),MATCH(K$2,'\\Sdc-svr1\staffplan\[Customer Staff Plan.xls]Customer Detail'!$A$5:$DD$5,0))

So what I wanted to do was this:

=INDEX('\\Sdc-svr1\staffplan\[CELL A1]CELL A2'!$A$1:$CN$1000,MATCH($C24,'\\Sdc-svr1\staffplan\[CELL A1]Cell A2'!$A$1:$A$1000,0),MATCH(K$2,'\\Sdc-svr1\staffplan\[CELL A1]CELL A2'!$A$5:$DD$5,0))

The other caveat is that I don't want to use any INDIRECT. I previously built an indirect report puller, and disliked having to open everything. If it can be done, it will open up a lot of doors for building reports for me. Thanks in advance!
 

Excel Facts

What is the last column in Excel?
Excel columns run from A to Z, AA to AZ, AAA to XFD. The last column is XFD.
Hi
I think a custom function can help you
in that function you can define all the variables you want and call that function from the worksheet.
ravi
 
Upvote 0

Forum statistics

Threads
1,214,971
Messages
6,122,520
Members
449,088
Latest member
RandomExceller01

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