Skip to main content

How to filter numbers end with a specific number in Excel?

Author Xiaoyang Last modified

Filtering data efficiently is a frequent requirement when working with large datasets in Excel. While the built-in Filter feature in Excel makes it straightforward to filter text strings that end with certain characters, it does not provide a similarly intuitive approach for filtering numeric values that end with specific digit(s). This limitation often arises in scenarios such as processing invoice numbers, product codes, or any numerical identifiers where the ending digits carry meaning. For example, you may need to identify all numbers that end with “00” representing a special category or summarize items ending in certain digits for further analysis. In situations like these, knowing robust workarounds not only saves significant amounts of time, but also helps minimize manual errors.

The following guide demonstrates practical methods to filter numbers ending with specific digits in Excel, including use of a helper column, VBA automation, Advanced Filter, and a discussion of their applicable scenarios, benefits, and potential limitations. These solutions make it possible to flexibly extract relevant numbers based on your project or reporting needs.

A screenshot showing numbers to be filtered based on their ending digits in Excel

Contents:
Filter numbers end with specific number with a helper column


Filter numbers end with specific number with a helper column

Although Excel does not directly offer a built-in function for filtering numbers that end with specific digits, using a helper column in combination with a formula is a straightforward workaround suited to a variety of workplace scenarios. Commonly, this approach is ideal when you have a large dataset and want a visual auxiliary to show whether each value meets your criteria before filtering, making the process transparent and reducing the risk of accidental exclusion.

For example, say you want to identify and filter all numbers in a list that end with "00"—such as for flagging round transaction amounts or identifying status codes.

A screenshot showing a goal of filtering numbers that end with00 in Excel

1. Insert the following formula next to your data column in a new helper column (for example, cell B2, assuming your numbers begin in A2):

=RIGHT(A2,2)="00"
Drag the fill handle down to apply the formula to the cells you want to check. This formula compares the last two digits of the number in column A. If the number ends with “00,” it will return TRUE; otherwise, it will show FALSE. The result visually distinguishes which rows match your specified criterion.

 

A screenshot showing the helper column formula applied to identify numbers ending with00 in Excel

Note: In the above formula, A2 refers to the cell containing the original number, 2 specifies how many ending digits to check, and 00 is the digit sequence you want filtered. Adjust these parameters to suit your specific requirements (for example, change “2” to “1” to check only the last single digit).

Tip: When the numbers are stored as numbers (rather than text), the RIGHT function works as Excel treats cell values as text within this function automatically.

2. After confirming the helper column displays TRUE/FALSE results, select your helper column and go to Data > Filter to activate the filter dropdown. Click the dropdown button for your helper column, unselect all except TRUE, as shown below:

A screenshot showing the Filter dropdown with TRUE selected in Excel to filter numbers ending with00

3. Click OK to apply the filter and display only rows where numbers end with your specified digits ("00" in this example). All matching values will now be visible, hidden from the rest of your dataset:

A screenshot showing the filtered numbers ending with00 in Excel

Advantages: This approach is simple to set up, easy to understand, and allows you to adjust the filter criterion just by changing the helper formula.
Limitations: It requires creating an extra column, which may not be convenient if you want to keep your table structure untouched.

Troubleshooting: If the helper column always returns FALSE, ensure that your numbers do not have unexpected formatting (such as hidden decimals or leading zeros). Additionally, for numbers with formatting or stored as text, you may need to adjust your formula.


Best Office Productivity Tools

🤖 Kutools AI Aide: Revolutionize data analysis based on: Intelligent Execution   |  Generate Code  |  Create Custom Formulas  |  Analyze Data and Generate Charts  |  Invoke Kutools Functions
Popular Features: Find, Highlight or Identify Duplicates   |  Delete Blank Rows   |  Combine Columns or Cells without Losing Data   |   Round without Formula ...
Super Lookup: Multiple Criteria VLookup    Multiple Value VLookup  |   VLookup Across Multiple Sheets   |   Fuzzy Lookup ....
Advanced Drop-down List: Quickly Create Drop Down List   |  Dependent Drop Down List   |  Multi-select Drop Down List ....
Column Manager: Add a Specific Number of Columns  |  Move Columns  |  Toggle Visibility Status of Hidden Columns  |  Compare Ranges & Columns ...
Featured Features: Grid Focus   |  Design View   |   Big Formula Bar    Workbook & Sheet Manager   |  Resource Library (Auto Text)   |  Date Picker   |  Combine Worksheets   |  Encrypt/Decrypt Cells    Send Emails by List   |  Super Filter   |   Special Filter (filter bold/italic/strikethrough...) ...
Top 15 Toolsets12 Text Tools (Add Text, Remove Characters, ...)   |   50+ Chart Types (Gantt Chart, ...)   |   40+ Practical Formulas (Calculate age based on birthday, ...)   |   19 Insertion Tools (Insert QR Code, Insert Picture from Path, ...)   |   12 Conversion Tools (Numbers to Words, Currency Conversion, ...)   |   7 Merge & Split Tools (Advanced Combine Rows, Split Cells, ...)   |   ... and more
Use Kutools in your preferred language – supports English, Spanish, German, French, Chinese, and 40+ others!

Supercharge Your Excel Skills with Kutools for Excel, and Experience Efficiency Like Never Before. Kutools for Excel Offers Over 300 Advanced Features to Boost Productivity and Save Time.  Click Here to Get The Feature You Need The Most...


Office Tab Brings Tabbed interface to Office, and Make Your Work Much Easier

  • Enable tabbed editing and reading in Word, Excel, PowerPoint, Publisher, Access, Visio and Project.
  • Open and create multiple documents in new tabs of the same window, rather than in new windows.
  • Increases your productivity by 50%, and reduces hundreds of mouse clicks for you every day!