简体   繁体   English

如何通过单元格值在VLOOKUP中使用名称

[英]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行,第一列为AnnouncementLast ChanceFinal Hours

In another sheet named Summary , I have a two cells with the following values - 在另一个名为Summary表中,我有两个单元格,其值如下:

  1. B2 contains Announcement B2包含Announcement
  2. 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 - 我试过了 -

  1. VLOOKUP(B2, B3, 3, FALSE)
  2. 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.

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