Share via

Excel Drop-down Field Filter

Anonymous
2013-01-14T14:44:59+00:00

An Excel table is populated via a query to a SQL view.  The data table is large and grouped by the field 'Batch'  We need to add a drop-down filter above the Excel table to select by 'Batch' such that by selecting a particular 'Batch' only that Batch's data shows in the Excel table.  How is this done? Thanks in advance for any help help anyone can offer here.  

Evan

Microsoft 365 and Office | Excel | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

3 answers

Sort by: Most helpful
  1. Anonymous
    2013-01-18T15:17:51+00:00

    This is the case: the SQL query populates a table on the Excel spreadsheet with drop-downs.  The problem with this route is that all the data must be brought over to the table first in order to filter this way.

    We need to filter via the SQL query by going into the Data tab -> Refresh All -> Connection Properties -> Definition tab -> Command Text field -> then type in the specific field's criteria in the SQL query's Where clause.

    This limits the amount of data sent to the Excel table -- sending over only that data pertaining to the criteria -- this keeps the table small, which is important for people who need to access it out in the field.

    So I'd like to put a Drop-down box onto the Excel Spreadsheet above the table -- the drop-down box needs to access the SQL query -- populating 'DISTINCT' Batch #'s from the 'Batch' field -- instead of going the circuitous route above.

    Not sure if this question should really be posted on a SQL forum but as the End table is in Excel - thought it best to post here.

    Thanks for your responses -- Evan

    Was this answer helpful?

    0 comments No comments
  2. Ashish Mathur 102K Reputation points Volunteer Moderator
    2013-01-15T00:13:53+00:00

    Hi,

    If the Excel Table is coming from a query, then the Excel Table should be in Table format with Auto filter drop down arrows appearing in all column headings.

    You can simply filter on any value in the Batch column.

    Hope this helps.

    Was this answer helpful?

    0 comments No comments
  3. HansV 462.6K Reputation points
    2013-01-14T15:15:36+00:00

    Click in the row with the field names.

    On the Home tab of the ribbon, in the Editing group, click Sort & Filter > Filter.

    This will add a dropdown arrow to each field name. Click the dropdown arrow in the Batch cell to select a value.

    Was this answer helpful?

    0 comments No comments