Data Import & Export

How to Filter Excel Data by a Larger Group Such as Province

Emma BrownEmma Brown Nov 11, 2026 868 views

Question details

The user needs to filter records by a larger regional group, such as a province, when the data column contains combined city and province text values.

How to Filter Excel Data by a Larger Group Such as Province
Product
Excel
Device & OS
not provided
Scenario
Organizing and filtering regional data where cities and provinces are combined in single cells (e.g., 'Toronto, ON').
Observed behavior
The default filter shows each individual city-province combination instead of allowing the user to filter by the broader province category.
Before you start

Ensure your data follows a consistent format, such as having a comma and a space before the province abbreviation, to make text filtering and extraction more accurate.

Solution 1Recommended

Use the Filter Drop-Down Search Box

The quickest method is to use the built-in search feature within the filter menu to find text containing the specific province abbreviation.

If your dataset already includes the province abbreviation in every cell (e.g., 'Ottawa, ON'), you can leverage the search bar inside the filter menu. This allows you to isolate rows containing that specific text string without modifying your existing data structure.

1
Enable the filter tool

Select the header of the column containing your city and province data. Go to the 'Data' tab on the top ribbon and click the 'Filter' button to enable drop-down arrows on your headers.

2
Open the filter drop-down

Click the drop-down arrow on the header of your location column.

3
Search for the province

In the search box located within the filter menu, type the province abbreviation (e.g., 'ON' or 'QC').

4
Apply the filter

Press 'Enter' or click 'OK'. Excel will now display only the records that contain the abbreviation you entered.

Use the Filter Drop-Down Search Box
Quick Filtering Tip: To ensure you don't accidentally filter cities that contain the same letters as the abbreviation (like 'London'), try searching for ', ON' including the comma and space.
Data Management Made Easy

Filter and Manage Large Datasets with WPS Office

WPS Spreadsheet offers advanced filtering, text-to-columns features, and extensive formula support to help you organize combined data seamlessly.

  1. 1. Open your dataset: Launch WPS Spreadsheet and open the workbook containing your city and province data.
  2. 2. Enable AutoFilter: Highlight your data headers, navigate to the 'Data' tab, and click 'AutoFilter'.
  3. 3. Filter or extract: Use the drop-down search box to quickly filter, or use WPS Spreadsheet's text formulas to split your locations into dedicated columns.
Seamless compatibility with Microsoft Excel (.xlsx, .xls, .csv) formatsAdvanced AutoFilter and custom text filtering capabilitiesHundreds of built-in text formulas to clean and extract dataFree, lightweight, and easy-to-use interface
microsoft office alternative - wps office

Frequently Asked Questions

Can I filter by multiple provinces at the same time using the search box?

No, the search box within the filter menu only allows you to filter by one text string at a time. To filter by multiple provinces simultaneously, it is best to extract the province to a separate column and check multiple boxes in the filter menu.

What if my data doesn't have a comma separating the city and province?

If your data is separated by a space instead of a comma, you can use the 'Text to Columns' feature under the Data tab and choose 'Space' as your delimiter. Alternatively, use a lookup table (VLOOKUP or XLOOKUP) to match city names to their respective provinces.

How do I group these filtered results in a Pivot Table?

To group by province in a Pivot Table, the province data must exist in its own separate column. Once you have used a formula or Text to Columns to separate the province, you can insert a Pivot Table and drag the new 'Province' field into the Rows or Filters area.