简体   繁体   English

#VALUE在公式(EXCEL)中使用AGGREGATE时出错

[英]#VALUE Error when using AGGREGATE in a formula (EXCEL)

Like the title says I am getting a #value error when using the AGGREGATE function. 就像标题说的那样,使用AGGREGATE函数时出现#value错误。 I am using it in conjunction with INDEX to return matched rows based upon an entered value (Customer ID). 我将它与INDEX结合使用,以根据输入的值(客户ID)返回匹配的行。

=INDEX(Equipment[Equipment ID],AGGREGATE(15,3,(Equipment[Customer ID]=$B$3)/(Equipment[Customer ID]=$B$3)*(ROW(Equipment[Customer ID])-ROW(Equipment[#Headers])),ROWS(Equipment!$B$2:B2)))

The INDEX portion of the formula is working just fine and returning the correct values. 公式的INDEX部分工作正常,并返回正确的值。 I have also used the same formula to create a section that looks up contacts (using the same formula) and that works perfectly. 我还使用了相同的公式来创建一个用于查找联系人的部分(使用相同的公式),并且效果很好。

Here is a view of some of the data: Partial Data from Equipment Table 这是一些数据的视图: 设备表中的部分数据

Needed to force the data into value format by using the VALUE() function. 需要使用VALUE()函数强制将数据转换为值格式。 Copying and pasting as values did not work. 复制和粘贴为值不起作用。 This fixed the error occurring with the AGGREGATE part of the formula. 这解决了公式的AGGREGATE部分发生的错误。

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

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