2

I've got lots of data in a Google sheet (I do not have Excel or Windows as I am on a Chromebook) and I want to use one column to filter out cells which contain two different words. The column of data might contain various values.

Example

Cell 1 Acme - Main - Location
Cell 2 Acme - Secondary - Location
Cell 3 Acme - Location - Main

Sticking with the above example, I would like to use my data filters set at the column headers to only show me cells where it matches Acme and Main.

What is the best way of doing this, please?

I tried using the Text Contains option in the data filter but I'm not sure how to insert both words as something to filter by, it seems to only filter the words exactly how they are typed. So if I type in Acme Main into the filter it will work for some cells which are in that exact order.

2 Answers 2

3

if the order of "acme main" combo does not matter you could use:

=REGEXMATCH(A1:A, "Acme(.+)Main|Main(.+)Acme")

0

if you also want it by any chance case-insensitive use:

=REGEXMATCH(LOWER(A1:A), "acme(.+)main|main(.+)acme")

0

1
  • 1
    This was really helpful player0, it's more flexible for me to select the data I need, no matter which order it is in. Thanks for taking the time to share this!
    – Pampa
    Aug 15, 2019 at 10:26
3

In the filter options, use this custom formula

=regexmatch(A1:A, "Acme(.+)Main")

and see if that works?

Change column reference to suit.

1
  • Thank you for taking the time out to answer this JPV! Your solution worked fine for me, I only chose the solution provided by player0 for it's flexibility to filter the data out no matter which order the values are in. Was hoping I could select both solutions as what answered my question! Thanks again.
    – Pampa
    Aug 15, 2019 at 10:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.