Excel’s "ends with" functionality lets you filter, find, or format data where a cell’s text includes a specific suffix, like "2023," "Old," or "-Date." This is useful for organizing reports, cleaning data, or automating tasks without manual sorting. You’ll need a spreadsheet with text columns (like names, dates, or codes) to use this, though Excel works with numbers too if formatted as text. No extra tools are required—built-in features handle it all.

What You'll Need

  • An Excel spreadsheet (2016 or later, or Excel Online) with a column containing text data.
  • Basic familiarity with Excel formulas or the Filters feature.
  • A cell containing the text you’re searching for (e.g., "2024" or "Report").
  • Optional: The Find & Select dialog (Ctrl+F) or the Sort & Filter group.

Step-by-Step

  1. Use the Find & Select dialog (Ctrl+F) for quick matches:
    1. Press Ctrl + F to open the Find & Select dialog.
    2. Go to the More tab (if not visible) and check Use wildcard characters.
    3. In the Find what box, type the exact suffix you’re looking for—add a * at the end (e.g., "2024*" to match all entries ending with "2024").
    4. Click Find All to highlight all matching cells. Press Esc to exit.
  2. Apply a FILTER to highlight ending text:
    1. Select the column with your text data.
    2. Click Data > Filter (in the Sort & Filter group).
    3. Click the dropdown arrow in the column header and choose Text filters > Ends with.
    4. In the dialog, type your suffix (e.g., "Old"). Excel will dynamically filter visible rows to only show those ending with your input.
  3. Use a formula to extract or verify endings:
    1. Pick an empty cell (e.g., K2) and type: =SUMPRODUCT(--ISNUMBER(SEARCH("*", SUBSTITUTE(A2," ",REPT(" ",100)),1)), A2="*") (This checks if a cell ends with a space by comparing to a padded version—adjust the padding if needed. For actual text endings, use: =RIGHT(A2, LEN("YourSuffix"))=YourSuffix.)
    2. Drag the formula down to apply it to all rows.
    3. Adjust the formula in the second line (e.g., "2024") to match your suffix.
  4. Create a custom list with endings:
    1. Copy your suffixes (e.g., "2024", "Old", "Final") into a new column (e.g., B).
    2. Select the column with text data, then click Data > Filter > Custom List.
    3. Click Yes and paste your list. Repeat for each suffix.
    4. To filter for multiple endings, click the dropdown in the column header and select the suffixes from your list.

Common Mistakes

  • Using the wrong wildcard (e.g., "2024*" vs. "2024-"): The asterisk (*) matches any sequence of characters *after* the input text. If your suffix is "2024-", add it as-is (no *). For "2024", use "2024*". Fix: Check the exact format of your suffix and adjust the wildcard accordingly.
  • Ignoring case sensitivity in filters: Excel’s basic "Ends with" filter is case-sensitive. If your data has mixed cases (e.g., "Old" vs. "old"), use a formula like: =UPPER(RIGHT(A2, LEN("Old")))=UPPER("Old") to make it case-insensitive.
  • Overlooking blank cells: The FILTER function may exclude blank rows by default. To include them, add =IFERROR(..., TRUE) to your formula or manually click the dropdown arrow in the column header and select All items before applying the filter.
  • Using incorrect RIGHT/LEN syntax: The formula =RIGHT(A2, LEN("Old"))="Old" fails if "Old" is longer than the suffix. Instead, use: =SUMPRODUCT(--ISNUMBER(SEARCH(YourSuffix, SUBSTITUTE(A2," ",REPT(" ",100)),1)), A2=REPT(" ",100)) to match partial suffixes safely.

Tips

  • Batch-check endings with a helper column: Create a new column and use the formula from Step 3 to flag rows that end with your suffix. This lets you spot patterns or outliers without filtering.
  • Combine with other filters: Use the FILTER function in Excel 365 or Excel Online with multiple conditions: =FILTER(A:A, SUMPRODUCT(--(RIGHT(A:A, LEN("2024"))="2024") & (ISNUMBER(SEARCH("Imported", A:A)))), 1) to find entries ending with "2024" *and* containing "Imported".
  • Leverage Power Query for complex logic: If you need advanced filtering (e.g., "ends with or starts with"), use Data > Get & Transform > From Table/Range, then load your data into Power Query. Apply a custom column query like EndsWith(Column, "2024") in the Advanced Editor.
  • Automate with VBA (for advanced users): Use this VBA snippet to highlight all rows ending with "2024": Sub HighlightEnding() Dim ws As Worksheet Set ws = ThisWorkbook.Sheets("Sheet1") Dim suffix As String: suffix = "2024" Dim rng As Range, cell As Range For Each cell In ws.UsedRange If Len(cell.Value) >= Len(suffix) And _ InStr(1, cell.Value, suffix, vbTextCompare) = Len(cell.Value) - Len(suffix) Then cell.Interior.Color = RGB(255, 200, 200) ' Light pink End If Next cell End Sub Paste this in the VBA editor (Alt+F11) and run it.

Troubleshooting

  • Filter doesn’t work:
    1. Ensure the column contains text (not numbers or dates). Convert numbers to text if needed by typing ="Text" & A2 in a helper column.
    2. Check for hidden characters or formatting (e.g., "Old\n" instead of "Old"). Use =TRIM(A2) in a formula to clean the data.
    3. If using Excel Online, some functions (like FILTER) may not support advanced features. Stick to the Find & Select method or a simple formula.
  • Formula returns errors:
    1. Verify your suffix matches the column’s actual ending. For example, "2024" in "2024-Report" fails because the suffix is "2024-" (extra characters). Trim the suffix with: =RIGHT(A2, LEN("2024")+LEN("-"))="2024-"
    2. Check for typos in your formula (e.g., "Olde" vs. "Old"). Use =ISNUMBER(SEARCH("Old", A2)) to test for partial matches.
  • Performance issues with large datasets:
    1. Limit your formula to only necessary columns. For example, use: =SUMPRODUCT(--(RIGHT(A:A, LEN("2024"))="2024"), (B:B="Value")) instead of checking all columns.
    2. Disable screen updating (Tools > Options > Advanced) during formula execution if the sheet freezes.
  • Excel Online limitations: Online versions may not support FILTER or advanced formulas. Use the Find & Select method or a simpler formula like: =IF(RIGHT(A2, LEN("2024"))="2024", "Match", "No Match")

Frequently Asked Questions

How do I find all rows ending with "2023" in Excel?

Use the Find & Select method (Ctrl+F) with "2023*" or apply the FILTER function (Data > Filter > Text filters > Ends with) and enter "2023." If filtering doesn’t work, use the formula: =RIGHT(A2, LEN("2023"))="2023" in a helper column.

Can I filter rows ending with multiple suffixes (e.g., "2024" or "2025")?

Yes! Create a custom list with "2024" and "2025," then filter by the list. For formulas, combine conditions: =SUMPRODUCT(--(RIGHT(A2, LEN("2024"))="2024") + --(RIGHT(A2, LEN("2025"))="2025")).

Why does my formula return false for "2024" but true for "2024-Report"?

Excel only checks the exact ending. "2024" fails because the suffix "2024-" includes extra characters. Use: =RIGHT(A2, LEN("2024-"))="2024-" or adjust your formula to account for padding.

How do I make the "Ends with" filter case-insensitive?

Replace the formula with: =UPPER(RIGHT(A2, LEN("Old")))=UPPER("Old") or use the Find & Select dialog with the Find what box set to "old*" (adds an asterisk for case-insensitive wildcard matching).

Can I use this for numbers (e.g., dates) formatted as text?

Yes! Format the column as Text (right-click > Format Cells > Text), then use the same formulas. For dates, ensure they’re stored as text (e.g., "2024-01-01") rather than a date format.

Why does my FILTER function return no results?

Common issues include: - Blank cells being excluded (add IFERROR(..., TRUE) to include them). - The suffix not matching the cell’s exact ending (use =SUMPRODUCT(--(IsText(A2), RIGHT(A2, LEN("2024"))="2024")) to ensure the cell is text). - Hidden columns or rows (verify the selection covers all data).