Count(If)公式在数组

时间:2019-01-30 11:06:14

标签: arrays excel

我有一个标准COUNTIF,该标准在另一个工作簿中计算特定数量的数据。

=COUNTIF('[Cumbria Jan.xlsx]Details '!$O$3:$O$5900,50%)

这将返回正确的值64。

但是,要使该功能在其他工作簿关闭时也能正常工作,我已将公式转换为数组,现在看起来像这样;

{=COUNT(IF('[Cumbria Jan.xlsx]Details '!$O$3:$O$5900,50%))}

这将返回不正确的结果76。

有人可以告诉我这是怎么回事吗?

1 个答案:

答案 0 :(得分:2)

那仅仅是因为转换后的公式是错误的。您基本上是说“如果<div className="result"> <h4>{t("Searches")}</h4> {this.renderSearches(Searches)} </div> renderSearches(Searches) { return Searches.map((item, index) => { return ( <div className="search-tab" key={index} onClick= {()=>this.openModal(item, 'Search Results')}> <div className="search-detail"> <span className="name">{item.name}</span> <span className="detail">{item.brand}</span> </div> </div> ); }); } openModal = (item, actionPerformed) => { console.log('actionPerformed === ', actionPerformed); this.setState({ isOpenModal: true }) } (这些单元格中的任何一个都不为空白,零或'false',则返回'50%',然后计算返回的50%的数目”。

我认为您可能想使用这样的东西:

$O$3:$O$5900

“如果=COUNT(IF('[Cumbria Jan.xlsx]Details '!$O$3:$O$5900=50%,1)) = 50%,则返回1,然后计算返回的1的数量”(对于相同的结果,您现在也可以使用$O$3:$O$5900代替SUM )。

相关问题