How to count the number of words In Excel

Nov 04, 2020 • edited Nov 06, 2020

How to count the number of words In Excel

This example describes how to count the number of words in a cell.

1a. The TRIM function returns a string with leading spaces, extra spaces and trailing spaces removed.

Trim Function

1b. To get the length of the string with normal spaces, we combine the LEN and TRIM function.

Len and Trim Function

2a. The SUBSTITUTE function replaces existing text with new text in a text string. We use the SUBSTITUTE function to get the string without spaces.

Substitute Function

2b. To get the length of the string without spaces, we combine the LEN and SUBSTITUTE function.

Len and Substitute Function

3. Now comes the simple trick. To get the number of words, we subtract the length of the string without spaces (10) from the length of the string with normal spaces (12) and add 1.

Number of Words

#Tutorial#How To#Functions

How to use RANK Function In Excel

How to Create a Roll the Dice In Excel