'How do I avoid IFERROR testing for empty arrays in FILTER function?

I want to count the results of a FILTER in excel. Usually I do something like

IF(
    IFERROR(
            SUM(
                FILTER( range, condition)
            )
    , -1) <> -1,
    COUNTA(FILTER( range, condition)),
    0
)

Because if your filter returns with an empty array, it throws an error. When you do a COUNTA on it it will return 1... how do I prevent this without stating my filter function twice?

How do I get a counta of empty filter to return zero?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source