Linking to another workbook without exact address

CHeil402

New Member
Joined
Jul 3, 2008
Messages
5
I'm working on creating a template for a file that contains a formula that links to a worksheet in the document that uses the template. The template is a timesheet that would be inserted into a file every week. There is a tab in the main document called 'Job Codes' that contains a list of job codes and their descriptions. I have a cell in the template with this formula: "=IF(A23="","",VLOOKUP(A23,'Job Codes'!$A:$B,2,FALSE))" I've tried putting '[Timesheets.xls]Job Codes' but it replaces this with the exact address (C:\blah blah blah\Timesheets.xls). So when I put this template on another computer, the link no longer works. Is there a way to put it so that when I import the template it links to that document, and not the exact address of the file?
 

Some videos you may like

Excel Facts

Can you sort left to right?
To sort left-to-right, use the Sort dialog box. Click Options. Choose "Sort left to right"

Andrew Poulsom

MrExcel MVP
Joined
Jul 21, 2002
Messages
73,092
Welcome to the MrExcel Board.

How about?

=IF(A23="","",VLOOKUP(A23,INDIRECT("'Job Codes'!$A:$B"),2,FALSE))
 

Watch MrExcel Video

Forum statistics

Threads
1,122,717
Messages
5,597,729
Members
414,169
Latest member
Preston_Cleric

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
Top