# Yes, it's another Excel question

**URL:** https://boards.straightdope.com/t/yes-its-another-excel-question/418122
**Category:** Factual Questions
**Created:** [September 5, 2007, 2:15pm UTC](https://boards.straightdope.com/t/yes-its-another-excel-question/418122 "2007-09-05T14:15:14Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![StGermain](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/stgermain/32/2868_2.png) [@StGermain](https://boards.straightdope.com/u/StGermain)
#### Post date: [September 5, 2007, 2:15pm UTC](https://boards.straightdope.com/t/yes-its-another-excel-question/418122/1 "2007-09-05T14:15:14Z")

</div>

I’m trying to do an advanced filter, filtering out all the transactions of 4 account numbers from a large list of many customers. Using a regular Custom filter, I can only filter out 2. Using the advanced filter, I tried to use the \<\> operator to tell it which 4 not to look for, but it’s a logical inconsistancy. If your account numbers are 20111, 20745, 78987 and 54012, the first time you tell it \<\> 20111, it automatically includes the others.

How can I filter more than 2 of any given criteria?

Thanks!

StG

---

<div class="post-metadata">

### Author: ![crazyjoe](https://avatars.discourse-cdn.com/v4/letter/c/f14d63/32.png) [@crazyjoe](https://boards.straightdope.com/u/crazyjoe)
#### Post date: [September 5, 2007, 4:26pm UTC](https://boards.straightdope.com/t/yes-its-another-excel-question/418122/2 "2007-09-05T16:26:06Z")

</div>

Set up another cell in your table, and have it default to a value of TRUE if the number is equal to any of your values, and FALSE if not. Formulas can be much more involved than filters. Then use your filter to filter out all rows where the new cell = TRUE

---

<div class="post-metadata">

### Author: ![K364](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/k364/32/5_2.png) [@K364](https://boards.straightdope.com/u/K364)
#### Post date: [September 5, 2007, 11:41pm UTC](https://boards.straightdope.com/t/yes-its-another-excel-question/418122/3 "2007-09-05T23:41:58Z")

</div>

**CrazyJoe’s** solution is probably the best.

But, if you want to use an Advanced Filter it can be done with a logical formula as criteria.

Refer to this [link](http://office.microsoft.com/en-ca/excel/HA012186941033.aspx) and see the section “Criteria created as the result of a formula” and the example that follows it.

For your situation, you need a formula "=AND(A2\<\>20111, A2\<\>20745, A2\<\>78987,A2\<\>54012) where A2 is the first Account Number cell in your table
