简体   繁体   English

Excel VLOOKUP #REF错误

[英]Excel VLOOKUP #REF Error

I'm trying to create an integrated athletic planning and training calendar. 我正在尝试创建一个综合的运动计划和训练日历。 Part of this is for one sheet to identify weeks in which races occur based upon races and dates identified by the user on another sheet. 部分原因是一张纸可以根据用户在另一张纸上标识的比赛和日期来确定比赛发生的星期。 I've confirmed that my VLOOKUP is not referencing a non-existent column and that the cell style is General for those applicable. 我已经确认我的VLOOKUP没有引用不存在的列,并且该单元格的样式适用于常规样式。

Here is the formula: 公式如下:

=VLOOKUP(Periods!A6,Races!$F$2:$F$20,2,FALSE)

公式工作表的图像目标工作表的图像

The Lookup Value is the Training week on the first image and is used to identify races on the target worksheet. 查找值是第一张图片上的训练周,用于在目标工作表上标识种族。 Each row on that sheet has a different training week. 该表上的每一行都有不同的培训周。 I am trying to get Column D (and F) on the formula sheet to show the priority of the race if there is one planned for the applicable week. 我试图在公式表中获取D列(和F列),以显示比赛的优先级(如果在适用的一周内计划了一场比赛)。

Any help is appreciated. 任何帮助表示赞赏。

Thanks! 谢谢!

Mike 麦克风

the ,2, in your vlookup here =VLOOKUP(Periods!A6,Races!$F$2:$F$20,2,FALSE) means go to the right of column F2:F20 if a match is found in column F, but, you need to specify F2:G20 for that to work in your vlookup formula. ,2,在您的vlookup中=VLOOKUP(Periods!A6,Races!$F$2:$F$20,2,FALSE)意味着,如果在F列中找到匹配项,请转到F2:F20列的右侧,但是,您需要指定F2:G20才能在您的vlookup公式中使用。 (which still won't give you the results you are expecting) (仍然无法获得预期的结果)

You have two options, 您有两种选择,

Option 1: reorganize your target worksheet so your lookup value is on the left, so you can use vlookup to pull columns to the right of it 选项1:重新组织目标工作表,以便您的查找值在左侧,因此您可以使用vlookup在其右侧拉出列

Option 2, use a different kind of formula like a Match + index combination. 选项2,使用另一种公式,例如Match + index组合。 (untested, but example below) (未经测试,但下面的示例)

=Index(Races!$B$2:$B$20,match(Periods!A6,Races!$F$2:$F$20,0))

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

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