using indirect function in Excel

◇◆丶佛笑我妖孽 提交于 2019-12-02 17:02:16

问题


I am using indirect function to create a link into another closed workbook. The objective is to retrieve the values without opening the workbook. I have used the following in one place which works.

=INDIRECT("[NVOL.xlsb]Sheet1!A"&C6)

However, in another place in the same sheet, the following does not work (gives a #ref error)

=INDIRECT("[MTM.xlsb]Sorted!A"&B6)

It appears [NVOL.xlsb] is taken as a substitute for the full path but the full path is not visible. I have two questions

a) The path in the former case (NVOL) somehow vanished. How do I make it sure it is visible so that the path can be changed if necessary?

b) How to make sure the MTM.xlsb is infact backed by a full path?


回答1:


Both workbooks must be open and Excel is very fussy about the syntax:

=INDIRECT("'C:\TestFolder[ABC.xls]NewName'!B" & A1)

(double quote) (single quote) (path name) (bracket) (file name) (close bracket) (!) (cell address) (double quote)



来源:https://stackoverflow.com/questions/22046546/using-indirect-function-in-excel

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!