Filter on multiple criteria, same cell

G

Guest

I'm using code linked from this forum (I can't remember exactly the website,
but the filename I got was DataValMultiSelect.xls)

I can get it to return the user selection to the offset cell, no problem.
I have changed the delimiter to ;

What I want to be able to do however is run a filter based on ANY of the
terms selected, rather than ALL of the terms.

Example:

Drop Down 1 has the values:
John, Jack, Steve, Bill, Tom, Jason
Selecting John, Steve and Jason places: John;Steve;Jason in the offset cell
These values are found on multiple occasions in column 1 of the data source.

Drop Down 2 has the values:
Julie, Sally, Kate, Kylie, Nancy, Kathy
Selecting Sally, Kate & Kathy places: Sally;Kate;Kathy in the offset cell
These values are found on multiple occasions in column 2 of the data source.

When I run the filter, I want to be able to find all records that have John,
Steve OR Jason in the first column AND Sally, Kate or Kathy in the second.

Any ideas?
 
D

Debra Dalgleish

Instead of adding all the selections to one cell, use the example that
puts the selections in the next available row in the adjacent column.

Then, in the criteria range for the advanced filter, leave the heading
cells blank.
In the first criteria cell below the headings, use a formula to check
for the names, e.g.:
=COUNTIF(O:O,F2)
where the list of selections is in column O, and the first name in the
main table is in F2.
Do the same in the cell to the right, for the second column of names.

When you run the advanced filter, select the blank heading cells and the
formula cells as the criteria range.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top