[英]How to use name in VLOOKUP from a cell value
I defined a range with a name Christmas2016
with data in a worksheet named Raw
. 我使用名为
Raw
的工作表中的数据定义了一个名为Christmas2016
的范围。
The range contains 3 rows with the first columns being Announcement
, Last Chance
, and Final Hours
. 该范围包含3行,第一列为
Announcement
, Last Chance
和Final Hours
。
In another sheet named Summary
, I have a two cells with the following values - 在另一个名为
Summary
表中,我有两个单元格,其值如下:
B2
contains Announcement
B2
包含Announcement
B3
contains Christmas2016
B3
包含Christmas2016
I want to run the VLOOKUP
function - VLOOKUP(B2, Christmas2016, 3, FALSE)
. 我想运行
VLOOKUP
函数VLOOKUP(B2, Christmas2016, 3, FALSE)
。 This, of course, executes fine. 当然,这执行得很好。 However, I want to replace the hard-coded name
Christmas2016
and use the value in the cell B3
. 但是,我想替换硬编码名称
Christmas2016
并使用单元格B3
的值。
I tried - 我试过了 -
VLOOKUP(B2, B3, 3, FALSE)
VLOOKUP(B2, &B3, 3, FALSE)
None of these work. 这些都不起作用。 Is there a way to use names in the formulas that are stored as cell values.
有没有一种方法可以在存储为单元格值的公式中使用名称。
这正是INDIRECT函数的用途。
=VLOOKUP(B2, INDIRECT(B3), 3, FALSE)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.