如何使用在excel文件中定义的名称到另一个excel文件 [英] How to use a name defined in an excel file to another excel file

查看:168
本文介绍了如何使用在excel文件中定义的名称到另一个excel文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经在excel文件中为数据范围定义了名称.现在,我想在不同的excel文件中使用相同的名称.我尝试了各种来源,但不确定如何做到这一点.

I have defined a name for a data range in an excel file. Now I want to use the same name in different excel file. I tried through various sources but not sure how to do that.

当前Soln: 我正在从源文件复制数据,并重新定义范围的名称.但这似乎是重复的,并创建了不必要的空间.

Current Soln: I am copying the data from the source file and re-defining the names for the range. But this seems to be duplicate and creates unnecessary space.

请让我知道一个好的方法.

Please let me know a good approach for this.

推荐答案

在其他Excel工作簿中,您需要指定包含命名范围的工作簿名称(如果该范围的范围是Worksheet而不是Workbook,则需要指定其工作表. (例如=VLOOKUP(B2,[SO20113631.xlsx]Sheet1!vRange,2,0)),并且如果源工作簿当时未打开,则其路径也应打开.

In a different Excel workbook you would need to specify the workbook name that contains the named range (and its worksheet if the scope for the range is Worksheet rather than Workbook, eg =VLOOKUP(B2,[SO20113631.xlsx]Sheet1!vRange,2,0)) and, should the source workbook not be open at the time, its path also.

可以用作查找表的范围的示例是:

An example for a range that might be used as a lookup table is:

其中A1:B4是左侧工作簿中名为vRange的工作簿作用域范围,并且该工作簿在与"book2"相同的Excel会话中打开.

where A1:B4 is a Workbook-scoped range named vRange in the workbook on the left and this workbook is open in the same Excel session as 'book2'.

使用路径,引用可能类似于
'D:\folder1\folder22\[SO20113631.xlsx]Sheet1'!vRange是否连接到本地驱动器(例如D:),其中单个反向逗号至关重要.您无需键入所有这些内容,但是,如果在打开源工作表时添​​加了引用,则在关闭该书时会自动添加路径.但是,如果在关闭状态下移动源位置,它将不会自动更新.

With path the reference might look something like
'D:\folder1\folder22\[SO20113631.xlsx]Sheet1'!vRange if to a local drive (eg D:) where the single inverted commas are critical. You do not need to type all this in however if the reference is added while the source sheet is open since the path will be added automatically when that book is closed. However it will not be updated automatically if the source location is moved while closed.

这篇关于如何使用在excel文件中定义的名称到另一个excel文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆