VLOOKUP 公式无法读取另一个公式生成的数据集

VLOOKUP formula cannot read dataset generated by another formula

我正在使用 Google 表格和其中的 VLOOKUP 公式。为什么下面的公式 return 是 0?

列 C2:Q150 是从公式和从其他工作表中提取的数字生成的。列 U4:U18 是使用 LARGE 函数生成的(以排序方式查找最大值)

根据您发布的文档,Google Sheet 的 VLOOKUP 函数的工作方式与 Excel 的相同。

所以您正在查找 $C$2:$C$150 范围(您指定为 $C$2:$Q$150 的 table 的第一列)以查找其中的最后一个值小于或等于 36 的列,即单元格 U4 中的值,然后返回找到的单元格行上 $C$2:$Q$150 范围第一列中的值。

如果 C 列的最后一个单元格包含一个零,则答案将为 0。

关于第四个参数(你设置为TRUE),documentation在它的注释中说:

If is_sorted is set to TRUE or omitted, and the first column of the range is not in sorted order, an incorrect value might be returned. If VLOOKUP doesn’t appear to be giving correct results, check that the last argument is set to FALSE. If the data is sorted and you need to optimize for performance, set it to TRUE. In most cases it should be set to FALSE.

对于 在 V4 中试试这个,

=INDEX(A:A, AGGREGATE(15, 6, ROW(:)/(C:Q=U4), COUNTIF(U:U4, U4)))

酌情填写。

中,这转化为,

=index(A:A, small(if(C:Q=U4, row(:)), countif(U:U4, U4)))