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?
 

Excel Facts

What did Pito Salas invent?
Pito Salas, working for Lotus, popularized what would become to be pivot tables. It was released as Lotus Improv in 1989.

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))
 
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,163,871
Messages
5,834,152
Members
430,261
Latest member
quangtinator

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