Excel - How to count a letter's occurences within a Cell


Can you please let me know if there is a way where a particular text string can be counted within a value of a cell itself.

For example: A cell contains AAAABBBCCCAAA and I need to calculate occurrences of alphabet 'A' in this particular cell.


This should do the trick:


To find alphabet "B" or any other character, replace the "A" with the appropriate letter, or reference it to another cell where you can store the letter you are looking for, e.g.


where B1 now contains "A", or "C", etc.


Thanks to WRL for this tip on the forum.
Published by aakai1056. Latest update on April 12, 2010 at 07:12 AM by aakai1056.
This document, titled "Excel - How to count a letter's occurences within a Cell," is available under the Creative Commons license. Any copy, reuse, or modification of the content should be sufficiently credited to CCM (https://ccm.net/).
Excel - Exporting data to another spreadsheet
Excel - How to count rows which show specified dates?