How to Count Alphabet in Excel Sheet: 5 Easy Methods

Method 1 – Using the LEN Function

Steps:

  • Go to cell C5 and insert the following formula.
=LEN(B5)

The syntax counts the letters of the alphabet in the text existing in cell B5.

  • Press ENTER and drag it down for other cells.

Using LEN Function to count alphabet in excel Sheet


Method 2 – Count Characters in a Range

Steps:

  • Move to cell D5 and input the following formula.
=SUMPRODUCT(LEN(B5:B10))

The LEN function returns the length of the string of each cell and returns an array of numbers of the alphabet from B5:B10. The SUMPRODUCT function adds those numbers and returns the total count of the alphabet.

Using SUMPRODUCT and LEN Functions to count alphabet in excel sheet


Method 3 – Count Characters in a Cell Without Space

Steps:

  • Use this formula in C5, then AutoFill through the column.
=LEN(SUBSTITUTE(B5," ",""))

The SUBSTITUTE function replaces all the spaces in the text of cell B5 and returns an empty string (“”), then the LEN function evaluates the number of characters returned by the SUBSTITUTE function.

Count Alphabet in a Cell Without Space in Excel Sheet


Method 4 – Count All Alphabets in a String

We’ll use the same formula as in Method 3.

=LEN(SUBSTITUTE(B5," ",""))

After initializing the above formula, press ENTER, and get the below output.

Count All Alphabets in a String


Method 5 – Count Specific Letters in a Cell

Let’s count the number of times the letter s appears in cells.

Steps:

  • In cell C5, enter the following formula.
=LEN(B5)-LEN(SUBSTITUTE(B5,"s",""))

Formula Breakdown:

  • SUBSTITUTE(B5,”s”,””) takes the text of B5 and removes “s”. Returns the text without “s”.
  • LEN(SUBSTITUTE(B5,”s”,””)) counts the length of the string returned by the SUBSTITUTE function.
  • LEN(B5) calculates the total length of the string of cell B5.
  • LEN(B5)-LEN(SUBSTITUTE(B5,”s”,””)) subtracts the string without “s” from the total string of cell B5.
  • Press ENTER and you’ll see the result in the image below.

Note: The SUBSTITUTE function is a case-sensitive function. So it takes the old_text argument “s” and replaces the small letter “s” from the string. The capital “S” is not applicable here.


How to Count Words in Excel

  • Go to cell C5 to insert the following formula.
=LEN(TRIM(B5))-LEN(SUBSTITUTE(B5," ",""))+1

Formula Breakdown:

  • SUBSTITUTE(B5,” “,””) substitutes the spaces of cell B5 with no spaces. In other words, it removes all the spaces from the words in cell B5.
  • LEN(SUBSTITUTE(B5,” “,””)) calculates the total number of characters in cell B5 without spaces.
  • TRIM(B5) removes all spaces from text except for single spaces between words in cell B5.
  • LEN(TRIM(B5)) calculates the total characters of the trimmed text in cell B5.
  • LEN(TRIM(B5))-LEN(SUBSTITUTE(B5,” “,””))+1 here, the total number of characters in cell B5 without spaces is subtracted from the total number of characters with spaces. Hence, essentially, we get the total number of spaces in cell B5. For one space, we get two words in a sentence. Therefore, we add an extra 1 to the formula to get the final word count.

Get the output after pressing ENTER. Use AutoFill if needed.


Download the Practice Workbook


Related Articles


<< Go Back to Count Characters in Cell | String Manipulation | Learn Excel

Get FREE Advanced Excel Exercises with Solutions!
Fahim Shahriyar Dipto
Fahim Shahriyar Dipto

Fahim Shahriyar Dipto is a graduate of Mechanical Engineering at BUET. With over 1.5 years of experience at Exceldemy, he authored 70+ articles on ExcelDemy. He has expertise in designing worksheets at You’ve Got This Math. Currently, He is a Team Leader at Brainor. Dipto's passion extends to exploring various aspects of Excel. Beyond tech, he enjoys creating engaging kids' worksheets using Illustrator. A dedicated employee and innovative content developer, He incorporates a commitment to academic excellence and... Read Full Bio

2 Comments
  1. Quite clean elaboration. I have a dataset where i have different types of sign and symbols in a sentence. But i want to count only the alphabets there. What modification should be done in this particular case? Can you show me a way Fahim?

    • Reply Avatar photo
      Fahim Shahriyar Dipto Dec 28, 2022 at 2:16 PM

      Hi Nathan,
      Thanks for your valuable feedback. If I am not wrong, you want to count the characters without the symbols. For this factor, we have taken a sentence that contains commas. To remove the commas and count the characters insert the following formula in cell C5.
      =LEN(SUBSTITUTE(B5," ",""))-LEN(B5)+LEN(SUBSTITUTE(B5,",",""))
      Press ENTER and get the following output.

      It counts the total characters without commas.

Leave a reply

Advanced Excel Exercises with Solutions PDF

 

 

ExcelDemy
Logo