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

Format cells as currency
Select range and press Ctrl+Shift+4 to format cells as currency. (Shift 4 is the $ sign).
Welcome to the MrExcel Board.

How about?

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

Forum statistics

Threads
1,214,938
Messages
6,122,346
Members
449,080
Latest member
Armadillos

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