Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Counting number of specific characters in a row (not in a range)

I’m having trouble finding a simple way to count "X"s marked in a row, but in specific columns.

On the left (highlighted in pink), I have various categories of "rope replacement reasons", and on the right, there are columns to log each instance of rope replacements with "X" marking different reasons.

I want to add all instances of "core" marked with X on anchor #1, all "fuzz" marked with X on anchor #1, etc.

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

enter image description here

Below is the link to the file:

https://docs.google.com/spreadsheets/d/1B35V6e-boAl8XWPpPuTI6gaMI0CsdOgGHvwrT0a-PQM/edit?usp=drive_link

i’m not sure how to do this..

>Solution :

try:

=COUNTA(IFNA(FILTER(P3:3; P3:3="X"; P2:2=F2)))

enter image description here

then you want to do:

=BYCOL(F2:J2; LAMBDA(x; COUNTA(IFNA(FILTER(P3:3; P3:3="X"; P2:2=x)))))

enter image description here

and next you want:

=BYROW(P3:50, LAMBDA(y, BYCOL(F2:J2, LAMBDA(x, COUNTA(IFNA(FILTER(y, y="X", P2:2=x)))))))

enter image description here

you can add some IF to hide zeros, or you can do:

=INDEX(IFERROR(1/(1/BYROW(P3:50, LAMBDA(y, BYCOL(F2:J2, LAMBDA(x, COUNTA(IFNA(FILTER(y, y="X", P2:2=x))))))))))

enter image description here

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading