Jul 22, 2022

Getting names with letters, in no order, and anywhere in the word

I have a list of names. I want to be able to pull names from the list that contain certain letters. I want to find all names that contain letter x, y, z, ... anywhere in the word, in any order. It does not matter if it is case-insensitive, or case-sensitive. It needs to be able to input anywhere from 1 - 9 letters. I haven't tried much because I do not have an extreme understanding of Google Sheets, or Excel, but I do not know how I would be able to put a formula that would be able to do that. Thanks for the help!
Locked
This question is locked and replying has been disabled.
Community content may not be verified or up-to-date. Learn more.
Recommended Answer
Jul 23, 2022
Hi, Atreyu Heller,

I've provided a different solution this time using non-array formulas.

B3 Formula (copied down):

=ArrayFormula(count(match(countifs(row(indirect("A1:A"&len(A3))),"<="&row(indirect("A1:A"&len(A3))),transpose(split(regexreplace(A3,".","$0,"),",)")),transpose(split(regexreplace(A3,".","$0,"),",)")))&transpose(split(regexreplace(A3,".","$0,"),",)")),countifs(row(indirect("A1:A"&len($D$1))),"<="&row(indirect("A1:A"&len($D$1))),transpose(split(regexreplace($D$1,".","$0,"),",)")),transpose(split(regexreplace($D$1,".","$0,"),",)")))&transpose(split(regexreplace($D$1,".","$0,"),",)")),0)))=len($D$1)

E2 Formula:

=filter(A3:A,B3:B)



Please check pkv_test2.

Best,

Prashanth KV
Last edited Jul 23, 2022
Original Poster Atreyu Heller marked this as an answer
Kudos awarded by Atreyu Heller:
Accurate
Helpful?
All Replies (16)
Jul 22, 2022
Please share a sample sheet.
Jul 22, 2022
Hi Atreyu:

I just checked ... the formula by Prashant does work

see the illustrations





Last edited Jul 22, 2022
Jul 22, 2022
https://docs.google.com/spreadsheets/d/153uW_cY9WmiO8xZWZFG8QLhOOmRzE7wYi-LJ9aEYu1s/edit?usp=sharing

That is a link to a copy, with editing privileges, it will currently work if you input letters into the input cell, however the only problem is that if there are repeating letters, for example, "aaa" it will just count it as "a". This is the problem that I now need to solve. I am unsure if you can put it into a formula. Maybe a macro will have to be used?
Jul 22, 2022
It is not clear what you are talking about "aaa" ...
Use your input letters / phrases, and show us and tell us 
what result you get?
in which cell?
provide the needed logic/explanation as to why that is the correct result.



false
7918197058017891287
true
Search Help Center
true
true
true
true
true
35
Search
Clear search
Close search
Main menu
false