Excel Hack 80: Count occurrences of a character or string in a cell in MS Excel

This is a short and quick hack that could come in handy while conducting complex text analysis in MS Excel.

If you needed to count the number of times a particular character, letter or string occurs within a cell (or a range of cells) in Excel, apply the formula below:

=(LEN([cell])-LEN(SUBSTITUTE([cell], "[character or string]","")))/LEN("[character or string]")

This is what it looks like in operation:

Leave a Reply

Your email address will not be published. Required fields are marked *