Everyone probably knows how to count char­ac­ters and words in Microsoft Word. The useful spread­sheet program Excel also offers this function. However, it is a little more difficult to use. Here, you will learn how to count and display the number of char­ac­ters in Excel.

Your very own .uk domain name!
Short, sharp, .uk

Looking for an al­tern­at­ive to the tra­di­tion­al .co.uk extension, or want to grow your online presence? Give .uk a try today.

£1 for 1 year!

How to count char­ac­ters in Excel

Counting the current number of char­ac­ters in Excel can be useful if you want to get an overview of your data entries. This function also comes in handy when combined with other functions to optimise messy customer data, such as removing excess blank spaces from data sets. You can count char­ac­ters in Excel using the LEN function.

Tip

If you are looking to use other Microsoft programs such as Word, Outlook or Power­Point in addition to Excel to properly organise your data sets, the Microsoft 365 package offered by IONOS is the perfect solution!

The LEN function: syntax

The LEN function allows you to calculate the number of char­ac­ters in Excel and is easy to use. It has a very simple syntax:

=LEN(cell reference)

The cell reference referred to in the function’s par­en­theses is the cell or cell range which contains the Excel char­ac­ters to be counted.

How to count the number of char­ac­ters in Excel

The LEN function is the perfect tool for per­form­ing this cal­cu­la­tion on specific cells and their contents or for de­term­in­ing the total number of char­ac­ters in your data set. Here are the major steps involved in this process.

Step 1: If you want Excel to count the char­ac­ters in a cell, enter the LEN function in an empty cell alongside the cell reference for the cell you want to analyse. For example, if cell B4 contains the word “TEXT”, insert the LEN function with the cell reference (i.e. B4) in another cell (here E4). Excel will then auto­mat­ic­ally calculate the total number of char­ac­ters in the cell, which is “4” in our example.

Step 2: If you want to apply this character counting function to multiple cells, you must first enter the function again in an empty cell and then enter the cell reference for the first cell in the cell range to be analysed.

Then, using the cell fill box (the small rectangle sur­round­ing the cell with the function), select the return value cells (here E4 to E6) for the entire cell range con­tain­ing the char­ac­ters to be counted. The LEN function will then be applied to all three example cells (B4 to B6) and count the number of char­ac­ters for these Excel cells sim­ul­tan­eously.

LEN + SUM: how to count and add Excel char­ac­ters

If you are looking for more than just an overall cal­cu­la­tion and want to add up and display the number of char­ac­ters in specific cells, use the LEN function in con­junc­tion with the SUM function:

=SUM(LEN(cell reference);LEN(cell reference);LEN(cell reference))

The syntax in this case appears a bit more com­plic­ated than the simple LEN function. In practice, however, combining the LEN and SUM functions is actually quite simple as the following step-by-step in­struc­tions will demon­strate.

Step 1: Select a suitable range with cor­res­pond­ing values for the LEN function. For example, we will enter the following text into cells A3, A4, and A5: “Learning Excel”, “Using Excel”, and “Prac­ti­cing Excel patiently”.

Step 2: Now, apply the com­bin­a­tion of the LEN and SUM functions to the cells:

=SUM(LEN(A3);LEN(A4);LEN(A5))

Excel will then display the number of char­ac­ters - which have been counted and added up - in a separate cell (here C7).

LEN + TRIM: counting and fixing Excel char­ac­ters

When counting char­ac­ters, if you want to remove any extra spaces in a data set, use the LEN function in con­junc­tion with the TRIM function. The TRIM function removes extra spaces from text in Excel. It has the following syntax:

=TRIM(text)

A typical scenario where you should use this com­bin­a­tion of functions is when dealing with messy data that has been trans­ferred. For example, if you were to transfer old customer data to a new database and discover that there were leading or trailing spaces in the customer data, you could use a com­bin­a­tion of the Excel LEN and TRIM functions to count the number of char­ac­ters and remove any extra spaces at the same time. In the following example, you will see two spaces before the customer “Irina” and two after the customer “Kon­stantin”.

Now, apply the LEN function to this data set.

=LEN(A3)

You can apply this function to the entire data set as shown above using the fill box.

If you count the Excel char­ac­ters in the example, you will see that the return values are incorrect for “Irina” (7 instead of 5) and “Kon­stantin” (12 instead of 10). These extra spaces need to be removed which can be done using the following steps.

Step 1: Create an ad­di­tion­al column and copy the original incorrect data into it. Then, apply the TRIM function to the first row involved.

Step 2: Now, drag the fill box to the bottom cell in the data set and apply the function to all the data selected.]

Step 3: To verify that the extra spaces have actually been removed, you can check the new corrected text data using the LEN function in an adjacent column.

Recheck­ing shows that the com­bin­a­tion of the LEN and TRIM functions has removed all the extra spaces.

Tip

In addition to counting char­ac­ters, you can also count cells in Excel. For this purpose, you will need the COUNTIFS function.

HiDrive Cloud Storage
Store and share your data on the go
  • Store, share and edit data easily
  • ISO-certified European data centres
  • Highly secure and GDPR compliant
Go to Main Menu