Advanced Query not returning correct results?!

  • Thread starter Thread starter Webtechie
  • Start date Start date
W

Webtechie

Hello,

I have a table

EmployeeID Assignmentment
1 6
1 7
2 5


The criteria range is

EmployeeID Assignment
2

The CopyTo Range keeps showing

EmployeeID Assignmentment
1 6
1 7
2 5


Why?!! It should show:

EmployeeID Assignmentment
2 5
 
Perhaps I am missing something but what are you talking about??? Are you
using formulas or are you doing an external query. Is your query parameter
driven. If it is an external query post your SQL. If it is a formula post
your formula.
 
You could be missing something or I was not clear enough:

1) I have a worksheet
2) I am using the Advanced Filter to copy values from my table to a
"copyto" range.
3) The table is located in Columns a b
4) This is supposed to be a basic spreadsheet query (using the advanaced
filter).

Hopefully that clarifes it for you.

Tony
 
That is an advanced filter and not a query... In any case... it works for me.
My best guess would be your criterai range is not set correctly. Make sure
that the column header is included as part of the cirteria range. Otherwise
the filter will not know which column the filter applies to.

Here is what I have. Your original table in Cells A1:B4. The criteria is in
cells D1:D2 and looks like

Employee ID
2

My Copy to Range is F1:G1
 
The headers were fine.

I noticed that the criteria range included an extra line. Instead of
DA1:DA2, it was DA1:DA3. This blank row, of course, was causing everything
in the table to be returned. I made the criteria range DA1:DA2 and it is
working fine.

Tony
 
Back
Top