Change Reference to Another Sheet on Cell A, based on value of Cell B

Corsan

New Member
Joined
Mar 31, 2019
Messages
3
Hi Team,

I'm wondering if you can assist.. i'm wondering if you can advise on the below. Let's say I have a cell that is basing it's result on a reference to another cell in another workbook.. such as this..

Code:
='L:\Documents\[Main Sheet.xlsm]KPI'!$B$5

How would I change it where the 'Main Sheet' part of this formula is based on another cell in the same sheet as the formula?

So for example... let's say the above formula is on A:1. Let's say whatever I change on B:2, defines to the exact wording on where 'Main Sheet' would be in the formula...

How would I go about doing this?
 

Excel Facts

Links? Where??
If Excel says you have links but you can't find them, go to Formulas, Name Manager. Look for old links to dead workbooks & delete.
Try this:

=INDIRECTO("'L:\Documents\[" & B2 & ".xlsm]KPI'!$B$5")

Note: the indirect function to another book only works if the other book is open, if you close the book you can return an error #¡REF!
 
Upvote 0

Forum statistics

Threads
1,223,893
Messages
6,175,240
Members
452,621
Latest member
Laura_PinksBTHFT

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