RoyalGoose
RoyalGoose

Reputation: 533

How to make a two-column filter in Excel?

I would like to make a two-column filter so that, for example, it displays all lines containing X, OR in column A OR in column B. If I just use the built-in filter and put an X in there, it only shows the lines that contain X AND in column A AND in column B. How can I implement an OR filter?

Source table

enter image description here

This is what I get:

enter image description here

This is what I need:

enter image description here

That is, X is contained either in column A or in column B

Upvotes: 0

Views: 33

Answers (1)

Gary's Student
Gary's Student

Reputation: 96781

Because the filter criteria are single-column specific, consider using a "helper" column. In C2 enter:

=OR(ISNUMBER(FIND("X",A2)), ISNUMBER(FIND("X",B2)))

and copy downward.

Then filter on column C looking for TRUE

Pre-filter:

enter image description here

post-filter:

enter image description here

Upvotes: 1

Related Questions