How do I join 2 fields to limit criteria?

C

Christen

I am trying to set a criteria with an OR clause in between 2 fields. Let's
call the 2 fields Field1 and Field2. I'm trying to do this example:
Only show the records that have this criteria:
Field1 = A, and Field2 = B,C,D,E,F,G

These 2 fields contain the same type of data, and we need to limit the
criteria together between the 2 fields?? Any ideas on how to do this when
using excel to build a query in Microsoft query?

Christen
 
J

Jason Morin

You could use an advanced filter. Assuming field1 and
field2 refer to columns A and B, type this into an open
cell (say M22) outside the data table:

=AND(A2="A",OR(B2={"B","C","D","E","F","G"}))

Now select the data table and go to Data > Filter >
Advanced Filter. In criteria range select M21:M22,
ensuring M21 is empty.

HTH
Jason
Atlanta, GA
 
Top