View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Debra Dalgleish Debra Dalgleish is offline
external usenet poster
 
Posts: 2,979
Default Filter on multiple criteria, same cell

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.

D Zandveld wrote:
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?



--
Debra Dalgleish
Contextures
http://www.contextures.com/tiptech.html