# Count if cells end with a specific text in Excel and Google Sheets

=COUNTIF(A2:A7,"*Apple") // criteria within formula

=COUNTIF(A:A,"*"&C6) // criteria as a cell reference

### A2:A7 & A:A = Ranges; C6 = Criteria; (a* = search "a" at start); (*b = search "b" at end)

Check below for a detailed explanation with pictures and how to use formulas in Excel and Google Sheets.

# Count if cells end with a specific text in Excel

How to count cells end with a specific text in Excel?

# COUNT IF CELLS END WITH A SPECIFIC TEXT — EXCEL FORMULA AND EXAMPLE

1. =COUNTIF(A2:A7,"*Apple") // criteria within formula

2. =COUNTIF(A:A,"*"&C6) // criteria as a cell reference

• A2:A7 = data range

• "*Apple" = criteria and must end with apple (non-case sensitive)

• * asterisk explanation

1. a* = "a" at start

2. *b = "b" at end

# Count if cells end with a specific text in Google Sheets

How to count cells end with a specific text in Google Sheets?

# COUNT IF CELLS END WITH A SPECIFIC TEXT — GOOGLE SHEETS FORMULA AND EXAMPLE

1. =COUNTIF(A2:A6,"*Apple") // criteria within formula

2. =COUNTIF(A:A,"*"&C6) // criteria as a cell reference

• A2:A6 = data range

• "*Apple" = criteria and must end with apple (non-case sensitive)

• * asterisk explanation

• a* = "a" at start

• *b = "b" at end

## Wild cards and regular expressions in Excel and Google Sheets

Wild cards and regular expressions