Ignore text with SUMPRODUCT [duplicate]

2020-05-05 18:23发布

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条回答
手持菜刀,她持情操
2楼-- · 2020-05-05 18:46

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.

enter image description here

查看更多
登录 后发表回答