Frage

I am trying to filter a column in Excel (2003). The column is populated with "filenames". I want to filter certain types of files using Excel's "Advanced Filters". The filename column (B) exists in sheet1, and the filter list in sheet2 column B.

  sheet1                sheet2
  column B              column B
1 Heading             1 Heading
2 file.doc            2 <>*.doc
3 file.html           3 <>*.pdf
4 file.pdf            4 <>*.mp3
5 ...                 5 ...

This is what I have found after many hours of search on the Internet. The problem is that this works for one entry, but not all. I.e. if I mark the entire column B in sheet1 and use column B1:B2 in sheet2 as the area criteria then Excel filters out all files that end with ".doc". But if I use column B1:B4 in sheet2 then nothing happens.

What I have tried so far:

  • "<>*.ext"
  • ="<>*.ext"
  • OR(.ext,.ext2)
  • OR(".ext",".ext2")
  • =OR(...)
  • <>(...)
  • ISERROR(SEARCH())
  • and many many more...

What am I doing wrong?

War es hilfreich?

Lösung

Since this is an OR filter, you need to put the criteria in the same row. It should look like the following:

  Sheet2
  Column B  Column C
1 Heading   Heading
2 <>*.doc   <>*.pdf

Here's an excellent post on advanced filters: http://searchengineland.com/advanced-filters-excels-amazing-alternative-to-regex-143680.

Andere Tipps

"AutoFilter allows you to filter using a maximum of two criteria." and "When you want to specify an AND operation you must place the conditions in separate columns." both from bettersolutions.com.

I think the best that can be managed this way is to choose two of your sheet2 selections in adjacent columns (say B2 & C2) of sheet2 and then use the range sheet2!$B$1:$C$2 as the criteria.

Maybe though to get what you want use a PivotTable just of sheet1 ColumnB and filter there.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top