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

Excel Can Read to You
Customize Quick Access Toolbar. From All Commands, add Speak Cells or Speak Cells on Enter to QAT. Select cells. Press Speak Cells.
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,223,227
Messages
6,170,849
Members
452,361
Latest member
d3ad3y3

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