rmfossi
rmfossi

Reputation: 91

Can I exclude blanks / 0 from an ArrayFormula countif?

I have a simpe ArrayFormula:

=ArrayFormula(countif(I2:I,J2:J))

How do I filter out the null counts?

The results I expect are rows that actually have results. I don't want a sheet full of 0s.

Upvotes: 1

Views: 248

Answers (2)

pnuts
pnuts

Reputation: 59485

To avoid displaying all 0s in the relevant column (whether because 'I' or 'J' cell empty/blank) you might format it as:

#;

Upvotes: 0

player0
player0

Reputation: 1

try either this:

=ARRAYFORMULA(IF(LEN(I2:I), COUNTIF(I2:I, J2:J), ))

or this:

=ARRAYFORMULA(IF(LEN(J2:J), COUNTIF(I2:I, J2:J), ))

Upvotes: 2

Related Questions