Link to home
Start Free TrialLog in
Avatar of Flora Edwards
Flora EdwardsFlag for Sweden

asked on

How to modify the count formula?

I have this formula

=SUMPRODUCT((1-ISERROR($M$2:$M$23))/COUNTIF($M$2:$M$23,$M$2:$M$23&""))

it excludes the count those cell that has Errors.

I want include two more conditions that do not count if the cell is empty and do not count If the cell has text which is simply a space  like this  " "
Avatar of Wayne Taylor (webtubbs)
Wayne Taylor (webtubbs)
Flag of Australia image

The regular COUNT function doesn't count errors, so this would be just as effective...

    =COUNT($M$2:$M$23)

If you are counting Text values and needing to use COUNTA we'd need to look at other options, but I'd use COUNTIFS instead of a SUMPRODUCT formula...

=COUNTIFS($M$2:$M$23, "<>#N/A", $M$2:$M$23, "<>#DIV/0!", $M$2:$M$23, "<>", $M$2:$M$23, "<> ")
ASKER CERTIFIED SOLUTION
Avatar of Professor J
Professor J

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial