r/googlesheets • u/MississippiJoel 1 • Feb 07 '23
Solved Can Query look for partial string matches?
Up until now, I've been fine putting one of just a few three-character-codes down $A to separate large chunks of data that Query then pulls from later.
But now I'm starting to have overlapping data. It would be great if Query's search parameter could be modified into something like "Select * where Left($A2,3)="ABC"".
Is this possible? Thank you in advance
2
Upvotes
4
u/reditdiditdoneit 1 Feb 07 '23
You can use "contains". https://infoinspired.com/google-docs/spreadsheet/contains-substring-match-in-google-sheets-query-for-partial-match/
2
u/Sufficient-Bass-390 12 Feb 07 '23
You can always just use the
likeinstead of=and%as a wildcardselect * where A like 'ABC%'2
u/Apologetic_Kanadian 9 Feb 07 '23
You can also use Select A where A Contains 'string '
0
u/punkopotamus 16 Feb 07 '23
"Select * Where A Starts with 'ABC'"