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

Excel count how many times a value appears in a range looking within cells

I have a column with unique emails and I need to count how many times each one is in another range with emails BUT in this one the cells can contain more than one email, and they are separated by a blank space, is there a way to count them?

It's something like this

Thank you

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

>Solution :

Try the following it will give you the exact number of occurrences as per your screenshots:

enter image description here


=LET(
     _Instances, SEQUENCE(,MAX(LEN(AllEmailsList[AllEmail])-LEN(SUBSTITUTE(AllEmailsList[AllEmail]," ",))+1)),
     SUM(N(IFNA(TEXTSPLIT(TEXTAFTER(" "&AllEmailsList[AllEmail]," ",_Instances)," "),"")=[@[Unique Email]])))

Another alternative way using FIND() & COUNT()

enter image description here


=COUNT(FIND(" "&[@[Unique Email]]&" "," "&AllEmailsList[AllEmail]&" "))

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