Filter query results with a cell value

  • Thread starter Thread starter Nuno Gomes
  • Start date Start date
N

Nuno Gomes

Hello,
I'm not expert in Excel, therefore, i like to place the following problem:
I have a sheet this a ODBC connection that it give me results of a query.
It would like to filter the data in the query with a value of a cell. It is
possible? How?

I use Excel 2007 with 2003 compatibility.

Thanks for the help, Nuno
 
Nuno,
It's certainly possible. Just use AutoFilter. If you want to code it rather than doing it manually, the code would be:
MyRange.AutoFilter Field:=ColumnNumber, Criteria1:=FilterValue
where MyRange is the query results, ColumnNumber is the number of the column that you want to filter on and FilterValue is the value you want to filter by.
HTH
Paul
 
Back
Top