简体   繁体   English

在Excel中使用间接功能

[英]using indirect function in Excel

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) 但是,在同一工作表的其他地方,以下操作无效(产生#ref错误)

=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. 似乎[NVOL.xlsb]被代替了完整路径,但是完整路径不可见。 I have two questions 我有两个问题

a) The path in the former case (NVOL) somehow vanished. a)前一种情况(NVOL)中的路径以某种方式消失了。 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? b)如何确保MTM.xlsb实际上具有完整路径支持?

Both workbooks must be open and Excel is very fussy about the syntax: 两个工作簿都必须打开,并且Excel对语法非常挑剔:

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

(double quote) (single quote) (path name) (bracket) (file name) (close bracket) (!) (cell address) (double quote) (双引号)(单引号)(路径名)(括号)(文件名)(右括号)(!)(单元格地址)(双引号)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM