Dynamic file path

chamullerousa

New Member
Joined
May 15, 2009
Messages
4
I have a question about how to do something (or if it is even possible to do) in excel 2003.

I have a single file that references various other files.

A1=John Doe
A2=='C:\My Documents\School\John Doe\[John Doe.xls]Sheet 1'!$H$5

A2 is not referencing A1 right now but I would like it to so that what I type in A1 will change the file path in A2.
For example:

if A1=John Doe
then A2=='C:\My Documents\School\John Doe\[John Doe.xls]Sheet 1'!$H$5
and
if A1=Jane Smith
then A2=='C:\My Documents\School\Jane Smith\[Jane Smith.xls]Sheet 1'!$H$5

I am trying to figure out how John Doe in A2 can be replaced with a reference to A1.

Currently I have to use Ctrl+H to Find and Replace the names over and over. Seeing as how this is needed 12 times per sheet on 24 sheets, even macros can't reduce the tediousness of updating regularly.

Please help!
 

Excel Facts

Lock one reference in a formula
Need 1 part of a formula to always point to the same range? use $ signs: $V$2:$Z$99 will always point to V2:Z99, even after copying
Kind of but I don't want the path to display the path with text, I want it to retrieve the data from the location but have the location adjust when the value in A1 is changed.


Cell Formula
B1 ='C:\My Documents\School\"&A1&"\["&A1&".xls]Sheet 1'!$H$5
 
Upvote 0
I have to be honest. I copied exactly what you typed in and it isn't working for me. Seriously. I went through keystroke by keystroke. Are you using 2007? Could that be the issue?

workbook1 (MrExcel.xls)
A1=5

workbook2
A1=MrExcel
B2='C:\Documents and Settings\mjmarsha\Desktop\[&A1&.xls]Sheet1'!$A$1

B2 is still showing an error. :(
 
Upvote 0
ok so I went home and tried the same thing on 2007 and still no change. i am realizing that you are using 2003 by the .xls extension in your formula. i really appreciate your help. I am hoping someone out there can try and duplicate your success and explain to me what I may be doing wrong because it isn't work for me.

any more ideas?
 
Upvote 0

Forum statistics

Threads
1,224,585
Messages
6,179,706
Members
452,939
Latest member
WCrawford

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