Filter query results with a cell value


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
 
Ad

Advertisements

Joined
Apr 29, 2008
Messages
66
Reaction score
0
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
 

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

Top