Home > Software design >  How to count any text in non contiguous cells in Google Sheets?
How to count any text in non contiguous cells in Google Sheets?

Time:09-15

I've tried all the formulas I found in a Google search and they don't work.

I'm trying to count non-contiguous cells that contain any text. So, there may be unique text strings in H8, H4, and H9 and the answer should be 3. Or, there may be unique text strings in H2:H5 and in H7 and H9 and that answer should be 6.

What is the formula? Many thanks!

CodePudding user response:

Use this formula

=ArrayFormula(IF(H2:H="",,COUNTIF(H2:H, "="&H2:H)))

enter image description here

CodePudding user response:

try in row 2:

=INDEX(IF(H2:H="";;COUNTIF(H2:H; H2:H)))
  • Related