In an earlier tip, I briefly explained how to perform Advanced Searching using Gmail's "query words". Here are two practical examples of how to use the "label:" query word to search for Multi-Labeled messages as well as Un-Labeled messages. Thanks to "rishid" on the GmailForums for submitting this tip...
Say you want to find messages that have multiple Labels. For example, you want to display all messages with label1, label2 and label3 that you had previously defined and assigned. Into the basic search field at the top of any Gmail page, you would enter label:label1 label:label2 label:label3
Note that this is searching for all messages that have label1 AND label2 AND label3. If you want to include messages that have ANY of those labels, you can use the "OR" command like this: label:label1 OR label:label2 OR label:label3 (Note: "OR" must be in uppercase.)
You can optionally add a "-" to the query words to exclude search criteria. For example, entering -label:label1 label:label2 label:label3 would return all messages that have label 2 AND label 3, but do not have a label1 Label.
Taking this concept a step further, you can use this method to search for all "Un-Labeled" messages. Unfortunatly, Gmail does not provide a choice in the search dropdown that lets you search for unlabeled messages. If you manage a large number of messages, it can be very cumbersome to determine which messages are unlabeled. My personal preference is to ensure that all messages have a Label making it easier to manage and organize them.
So, if you want to list all unlabeled messages, just create a long search string containing every label that you have defined. Be sure to include the "-" character in front of every label. This ensures that messages with these labels will be EXCLUDED (remember, you are looking for all messages WITHOUT Labels.) You can also optionally include the hidden "inbox" Label to exclude anything in your Inbox.
For example, if you have defined the Labels "Family", "Friends", "Ebay", and "Support", you would enter the following string into the search field (note that the labels are not case sensitive) to find all Unlabeled messaegs:
-label:inbox -label:family -label:friends -label:ebay -label:support
If you have a large number of labels, obviously, this becomes harder and harder to manage, so I recommend reating a "note" email to yourself containing the search string for easy future reference.
- PC Magazine, 2006
- PC Magazine, 2006