INDIRECT problem

smokenack

Active Member
Joined
Dec 12, 2003
Messages
351
I have been trying to integrate the INDIRECT function into a link between two workbooks but have made a total hash of it.

Cell D1 will contain the worksheet name that I am trying to link to.

this is the sort of thing that I've tried.

=\home\super\working time\WTD\[WTDRoster.xls]INDIRECT($D$1"'!E4)

It doesn't work nor do any permutation that I've tried. a simple syntax error hopefully.

thanks for looking

Nick
 

Excel Facts

Does the VLOOKUP table have to be sorted?
No! when you are using an exact match, the VLOOKUP table can be in any order. Best-selling items at the top is actually the best.
smokenack said:
I have been trying to integrate the INDIRECT function into a link between two workbooks but have made a total hash of it.

Cell D1 will contain the worksheet name that I am trying to link to.

this is the sort of thing that I've tried.

=\home\super\working time\WTD\[WTDRoster.xls]INDIRECT($D$1"'!E4)

It doesn't work nor do any permutation that I've tried. a simple syntax error hopefully.

thanks for looking

Nick

=INDIRECT("'\home\super\working time\WTD\[WTDRoster.xls]"&$D1&"'!E4")
 
Upvote 0
Thanks Aladin.I have managed to enter this into the cell but it has produced an invalid cell reference error. Formula evaluation shows $D1 underlined and step in comments 'the cell being evaluated contains a constant' Cell D1 contains 30.01.05

Any more thoughts would be appreciated

Nick
 
Upvote 0
smokenack said:
Thanks Aladin.I have managed to enter this into the cell but it has produced an invalid cell reference error. Formula evaluation shows $D1 underlined and step in comments 'the cell being evaluated contains a constant' Cell D1 contains 30.01.05

Any more thoughts would be appreciated

Nick

Here WTDRoster.xls. The file path is:

C:\ExcelMisc\smokenack\[WTDRoster.xls]

Note that you don't have a drive specification. Maybe that is the issue if I didn't make a mistake with the INDIRECT formula.
WTDRoster.xls
ABCDEFG
1C:\ExcelMisc\smokenack\[WTDRoster.xls]30.01.05
2C:\ExcelMisc\smokenack\[WTDRoster.xls]
3
4Grotegenade
5
6
7
30.01.05


The following reads E4 from the sheet named 30.01.05 from within smokenack.xls...

For all this work, the WTDRoster.xls must be open, a requirement when using INDIRECT.
smokenack.xls
CDEF
130.01.05Grotegenade
2
3
4
Sheet1


E1:

=INDIRECT("'C:\ExcelMisc\smokenack\[WTDRoster.xls]"&$D1&"'!E4")

If WTDRoster.xls should stay closed, try to track down the PULL function by Harlan Grove here on this site or using Google.

Another option is INDIRECT.EXT that comes with the morefunc.xll add-in...

=INDIRECT.EXT("'C:\ExcelMisc\smokenack\[WTDRoster.xls]"&$D1&"'!E4")
 
Upvote 0
thanks I've got it to work by shortening the file path to [WTDRoster.xls] As both workbooks have to be open and reside in the same folder I was unnecessarily complicating matters.

Thanks for your help.

Nick
 
Upvote 0

Forum statistics

Threads
1,203,465
Messages
6,055,574
Members
444,799
Latest member
CraigCrowhurst

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