How do I join 2 fields to limit criteria?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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
 
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top