How to Search Gmail Using Logical Operators OR and NOT, Advanced Searches

You know the scenario. You received an email a while ago, you’re sure you have it, but now you can’t find it. When you try to search for it you get so many matching mails you don’t know which is the one you are looking for. If you know how, you can be very specific when you search Gmail making finding that email much easier. Here’s how.

The Gmail search function is very powerful, but using it to best effect is not always obvious. If you are a regular Gmail user you probably already know about the search field at the top of the Gmail screen (see the picture above). Most of us can cope with typing simple searches.

The Gmail Advanced Search Pop-up

For more complex searches you can click on the arrow at the end of the search field to see a lot more search options:

Screen capture showing the options of the Gmail Advanced Search Box

The Gmail Advanced Search Box

The advanced search box lets you specify what mail you want to search, Your inbox, starred items, spam, trash, sent mail, and any labels you’ve used to label your mail. Selecting ‘Mail & Spam & Trash’ will search all your mail.

The options should be fairly obvious from their titles. Not sure? Just play with it.

More Precise Searches

By default Gmail will search your mail messages for any of the words you type. Which is fine unless you are getting hundreds of results and none of them seem to be the email you are desperately searching for.

Searching for specific words: If you want to search for an exact word put a ‘+’ in front of it. +sausage will find mail with the word ‘sausage’ in it but not ‘sausages’.

Searching for a phrase: you can enclose text in quotes to exactly match several words. The case of the letters and any punctuation is ignored. Example: "How to search your Gmail inbox" and "How to search. Your 'Gmail' inbox" will return the same results.

To exclude a word from a search: Use ‘-‘ -sausage will exclude any mail with sausage in it. ‘-‘ works like ‘+’ in that it matches the exact word specified.

To search for one word or another: Use ‘OR’ or ‘||’ example Black OR white will list email containing the words ‘black or white’. It’s important to use capital letters for OR.

Advanced Gmail Search Terms

There are a whole load of special terms you can type in to narrow your search. Some duplicate the functionality of the Gmail Advanced Search Pop-up, many extend it further to enable your to find just the email you are looking for.

Here are a few key ones.

from: Example: from:gary or you can give the whole address: from:gary@davis-allman.com Gmail will offer you matching email addresses to choose from as you type your search text.

in: example: in:anywhere fred will find the text ‘fred’ in a mail in trash, drafts, spam or the inbox. anywhere is great if you’ve accidentally trashed an important email. The options are: anywhere, spam, inbox, drafts and trash.

is: extremely useful for managing your Gmail mail. Try: is:unread allowing you to search for unread mail. The full set of options are: important, starred, unread and read.

label: If you aren’t using labels (they work like tags) with your Gmail then you are missing out on organizing your mail, but that’s a topic for another day. Label:Project will list all your mail labeled with ‘Project’. Note if you have spaces in your label name, they have to be replaced with a hyphen. So label:project-x will search or list all mail labeled ‘Project X’. Don’t worry though, Gmail offers you a list of labels to choose from as you type.

There are lots more options to search Gmail

Here’s a list.

from:, to:, subject:, OR, – (hyphen), label:, has:, list:, filename:, “” (quotes), (), in:, is:, cc:, bc:, after:, before:, older:, newer:, older_than:, newer_than:, deliveredto:, circle:, size:, larger:, smaller:, + (plus sign).

They are all fairly obvious, for a full description of what they do and how to use them visit the Google Mail Advanced Search Help Page

Having trouble using the new Gmail email compose pop-up? Check out this article

What do you think?