130

I'm trying to find mails that have one address in the recipients but another not in it.

I'm trying things like from:address1@gmail.com and not from:address2@gmail.com and from:(address1@gmail.com and not address2@gmail.com)

None of them work, and I can't find a good help page about boolean operators either.

Anyone has any idea?

Rubén - Volunteer Moderator -
  • 46,305
  • 18
  • 101
  • 297
Steven Roose
  • 3,324
  • 4
  • 20
  • 24

5 Answers5

137

The 'or' function in Gmail is represented by 'OR'. You also can use quotes (" ") to specify an exact phrase.

From the Gmail help page on Boolean operators.

The 'not' function is represented by a minus (-), like -from:(...), -{from:(...)}, or -(from:(...))

Alex
  • 22,820
  • 12
  • 83
  • 106
32

Use the minus sign to make a negative rule. You can also string rules together by just leaving a space between separate rules.

For example:

from:name@company.com -from:name2@company.com

or you can do things like

is:unread -in:spam -in:trash
Eric Warnke
  • 421
  • 4
  • 6
10

For not in Google, use -, like so:

from:addres1@gmail.com -address2@gmail.com
Alex
  • 22,820
  • 12
  • 83
  • 106
Dave
  • 209
  • 1
  • 2
9

when trying to avoid multiple phrases in a subject line for selection:

-("phrase one" OR "phrase two" OR "word1")
Peter W
  • 191
  • 1
  • 2
6

This will work:

from:@company1.com -address2@company1.com

This puts all messages from any sender at company1.com into a folder except those from the individual address2@compay1.com.

Alex
  • 22,820
  • 12
  • 83
  • 106
Dave
  • 61
  • 1
  • 1