Ignore text with SUMPRODUCT [duplicate]

梦想的初衷 提交于 2019-12-04 05:58:56

问题


I'm using SUMPRODUCT() to calculate the p-mean of data where p=3:

=(SUMPRODUCT(E2:E99^3)/COUNT(E2:E99))^(1/3)

There are -'s mixed into the data. How can I ignore them so as not to get a value error and still get the correct answer (as if the -'s weren't there)?


回答1:


To deal with non numbers in the range use this array formula:

=(SUM(IF(ISNUMBER(E2:E99),E2:E99^3))/COUNT(E2:E99))^(1/3)

Being an array formula it must be confirmed with Ctrl-Shift-Enter instead of Enter when exiting edit mode.



来源:https://stackoverflow.com/questions/59060385/ignore-text-with-sumproduct

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!