Quick, clean, and to the point

Count cells that end with

Excel formula: Count cells that end with
Generic formula 

To count the number of cells that end with specific text, you can use the COUNTIF function. In the generic form of the formula (above) txt represents the text that cells should end with, and "*" is a wildcard matching any number of characters. In the example, cell F4 contains this formula:


COUNTIF counts the number of cells in the range that end with "r" by matching the content of each cell against the pattern "*r", which is supplied as the criteria. The "*" symbol (the asterisk) is a wildcard in Excel that means "match any number of characters". The count of cells that match this pattern is returned as a number.

Note: you can use a tilde character (~) to search for literal wildcards, as explained here.

Dave Bruns

Excel Formula Training

Formulas are the key to getting things done in Excel. In this accelerated training, you'll learn how to use formulas to manipulate text, work with dates and times, lookup values with VLOOKUP and INDEX & MATCH, count and sum with criteria, dynamically rank values, and create dynamic ranges. You'll also learn how to troubleshoot, trace errors, and fix problems. Instant access. See details here.

Download 100+ Important Excel Functions

Get over 100 Excel Functions you should know in one handy PDF.