Skip to content

Reversing an Outlook filter

Frank B from Iowa has an interesting idea for Outlook:

Search folders can be a great tool if there’s just one simple filter, but what if you don’t want to see message from Sally, Sue, and John, but everyone else?

In other words, Frank wants the reverse of a standard Outlook filter which shows you messages from particular senders.

That’s easily done in either Search Folders or custom Outlook views.  The same filter dialog and options are available in both, with one exception.

A simple Outlook filter uses the From field and the ‘contains’ command like this:

This will show only messages where the From line includes the phrase ‘Google Alerts’.

If you want to show all messages EXCEPT ‘Google Alerts’, just change “contains” to “doesn’t contain”.

For Frank, here’s an example with multiple people excluded:

SQL filter

Most Fields have a ‘reverse’ option on the Advanced tab conditions.  Wherever possible use the options on the first three filter tabs to choose (or not) what you want.

However, occasionally you have to dig deeper into Outlook.  Specifically the SQL tab which is available for Outlook Views but not Search Folders.

When you set a filter on the Messages, More Choices or Advanced tabs, you’re actually making a SQL database query.  SQL is the common language for working with databases.  If you’re not familiar with the basics of SQL queries, probably best to stop here.

For example, here’s the SQL tab display for a filter to show only messages with the category ‘Travel’:

Which was created from this choice on the More Choices tab:

What if you want to show all messages which don’t have that Category?

(You can do the same “doesn’t contain” trick from the Advanced tab. For the sake of this simple example, let’s pretend you can’t.)

To reverse a set filter, check the ‘Edit these criteria directly’ box.

Take the warning ‘All other tabs will be unavailable’ seriously.  Once you start editing the SQL query, you’re on your own.

We strongly suggest you test your Outlook SQL with a copy of the original filter/view.

One option is to change the equals sign =  to not equals <>  like this:

If you have more complex filters, with multiple criteria, it’s easier to wrap the entire SQL query with a ‘NOT’ which reverses the entire result:

The ‘NOT’ goes before the double-quote mark at the very start of the line.

This is easier to test.  Setup the ‘positive’ SQL query as you like, then just type NOT at the start which should ‘flip’ the results.

Note:  some readers are reporting that using NOT on an existing statement does work as you’d expect.

About this author

Office-Watch.com

Office Watch is the independent source of Microsoft Office news, tips and help since 1996. Don't miss our famous free newsletter.