Can excel count symbols

Count characters in cells

Excel for Microsoft 365 Excel for the web Excel 2021 Excel 2019 Excel 2016 Excel 2013 More…Less

When you need to count the characters in cells, use the LEN function—which counts letters, numbers, characters, and all spaces. For example, the length of «It’s 98 degrees today, so I’ll go swimming» (excluding the quotes) is 42 characters—31 letters, 2 numbers, 8 spaces, a comma, and 2 apostrophes.

To use the function, enter =LEN(cell) in the formula bar, then press Enter on your keyboard.

Multiple cells: To apply the same formula to multiple cells, enter the formula in the first cell and then drag the fill handle down (or across) the range of cells.

Entering mulitple LEN functions in a worksheet

To get the a total count of all the characters in several cells is to use the SUM functions along with LEN. In this example, the LEN function counts the characters in each cell and the SUM function adds the counts:

=SUM((LEN(
cell1
),LEN(
cell2
),(LEN(
cell3
))
)).

Give it a try

Here are some examples that demonstrate how to use the LEN function.

Copy the table below and paste it into cell A1 in an Excel worksheet. Drag the formula from B2 to B4 to see the length of the text in all the cells in column A.

Text Strings

Formulas

The quick brown fox.

=LEN(A2)

The quick brown fox jumped.

The quick brown fox jumped over the lazy dog.

Count characters in one cell

  1. Click cell B2.

  2. Enter =LEN(A2).

The formula counts the characters in cell A2, which totals to 27—which includes all spaces and the period at the end of the sentence.

NOTE: LEN counts any spaces after the last character.

Count
characters in
multiple cells

  1. Click cell B2.

  2. Press Ctrl+C to copy cell B2, then select cells B3 and B4, and then press Ctrl+V to paste its formula into cells B3:B4.

This copies the formula to cells B3 and B4, and the function counts the characters in each cell (20, 27, and 45).

Count a total number of characters

  1. In the sample workbook, click cell B6.

  2. In the cell, enter =SUM(LEN(A2),LEN(A3),LEN(A4)) and press Enter.

This counts the characters in each of the three cells and totals them (92).

Need more help?

Want more options?

Explore subscription benefits, browse training courses, learn how to secure your device, and more.

Communities help you ask and answer questions, give feedback, and hear from experts with rich knowledge.

Skip to content

Подсчитать количество символов или слов в Excel

Готовые формулы и решения для подсчета символов или слов

Надстройка делает именно то, что предполагает ее название: подсчитывает слова и символы в Excel. Вы можете пересчитать все символы или слова в ячейке, а также узнать количество конкретных букв. Результаты могут быть возвращены в виде значений или формул для многократного использования.

  • 60-дневная безусловная гарантия возврата денег

  • Бесплатные обновления на 2 года
  • Бесплатная и бессрочная техническая поддержка

С помощью инструмента подсчёта слов и символов вы сможете:

Подсчитать все символы в Excel

Надстройка возвращает количество символов в каждой ячейке выбранного диапазона.

Подсчитать количество слов в Excel

Узнайте количество слов в каждой ячейке в определенном диапазоне.

Подсчитать количество определенных символов в выбранных ячейках

Посчитайте, сколько раз конкретный символ появляется в вашем наборе данных.

Вставить результат как значение или формулу

Получите результаты в виде статических чисел или обновляемых формул.

Как считать буквы и слова в Excel

Приложение Ultimate Suite уже используют
companies logo

Что такое инструмент подсчёта символов и для чего он мне нужен?

Надстройка «Подсчет символов» позволяет подсчитывать количество символов и слов в ячейках Excel. Вы можете получить общее количество символов в выбранных ячейках или подсчитать количество вхождений определенного символа. Инструмент позволяет вставить результат в виде числа или формулы.

Разве я не могу подсчитать количество символов в Excel без всяких надстроек?

Да, безусловно можете. Вероятно, нет ничего страшного в том, чтобы подсчитать все символы в ячейке с помощью формулы ДЛСТР. Чтобы подсчитать количество слов в Excel, будьте готовы построить более сложную формулу, комбинируя различные функции, такие как ДЛСТР, СЖПРОБЕЛЫ и ПОДСТАВИТЬ. Подсчет числа конкретных символов может быть еще сложнее.

С помощью инструмента «Подсчет символов» количество ваших действий сокращается до пары щелчков мышью.

Как посчитать символы и слова в Excel?

  1. Щелкните значок «Подсчет символов (Count Characters)» на вкладке «Ablebits Data».
  2. Выберите диапазон для подсчёта.
  3. Укажите, что вам нужно посчитать: символы, определенные символы или слова.
  4. Решите, хотите ли вы получить результат в виде формулы и нужна ли вам резервная копия вашего листа.
  5. Щелкните Вставить результаты.

Мне нужен результат в виде формулы, может ли это сделать надстройка?

Да. Надстройка вставляет простую формулу ДЛСТР для подсчета количества символов и более сложную формулу для подсчета слов.

Куда надстройка помещает результаты?

Программа вставляет новый столбец справа от выбранного диапазона и помещает результат рядом с каждой ячейкой с исходными данными.

Скачать  Ultimate Suite

Посмотреть все комментарии

After this tutorial you will be able to count total characters in a cell or range, occurrences of specific character or character combination in a cell or range with both case sensitive and insensitive alternatives. Knowledge gained in this tutorial is a really good base for further creative Excel problem-solving.

How to Count Characters in Excel

If you want to learn how to count characters in Excel, you need to use function LEN, using formula =LEN(cell) for counting total characters in a cell, or combination of functions SUMPRODUCT and LEN for counting total characters in a range with formula =SUMPRODUCT(LEN(range)). Additionally, counting of a specific character in a cell or range and specific combination of characters in a cell or a range will be explained in detail.                

  1. Count Total Characters in a Cell
  2. Count Total Characters in a Range
  3. Count Specific Character in a Cell
  4. Count Specific Character in a Range
  5. Count Specific Combination of Characters in a Cell or Range

Count Total Characters in a Cell

Total characters in a cell can be easily found using Excel function LEN. This function has only one argument, cell reference or text, where total character number would like to be counted:

=LEN(text)

=LEN(B3)

This function counts total characters in a cell, including spaces, punctuation marks, symbols, despite how many times they occur in a string.

If we want to count total characters in a cell, excluding spaces, the combination of formulas LEN and SUBSTITUTE will be required. Let’s take a look in the example below, the formula that excludes spaces looks like:

=LEN(SUBSTITUTE(B3;" ";""))

The SUBSTITUTE function changes in a defined cell one character/text with another character/text. If we want to exclude spaces, using this function, they will be eliminated, replacing all occurrences of spaces with an empty string. After SUBSTITUTE, function text in a cell would look like:

=LEN(“Sunisshining”)

After that, it is easy to count total characters with LEN function, with the final result of 12 characters.

Count Total Characters in a Range

For counting total character number in a defined range, the combination of two functions is needed, SUMPRODUCT and LEN. SUMPRODUCT function usage is elegant solution whenever we are dealing with multiple cells or arrays. Take a look in the example below and a combination of the formulas:

=SUMPRODUCT(LEN(range))

=SUMPRODUCT(LEN(B3:B6))

LEN function is related to cell, but for cell ranges usage of summed LEN functions (=LEN(B3)+LEN(B4)+LEN(B5)+LEN(B6)) is not the best solution since we could be dealing with huge ranges. Instead of that, SUMPRODUCT function summarizes results of LEN function in the defined range. In formula evaluation, the result will look like:

=SUMPRODUCT({14;24;22;15})

Numbers from the array are LEN function results from each cell in the defined range B3:B6, giving final character results of 75.

The alternative solution for dealing with ranges is the usage of SUM and LEN function combination. The syntax is almost the same, with the only difference of curly brackets usage, in order to convert SUM function in array formula (Shortcut for creating an array is CTRL+SHIFT+ENTER). In the formula below is the exact syntax for SUM/LEN function combination:

={SUM(LEN(B3:B6))}

Count Specific Character in a Cell

Besides the total character number, there is also the option in Excel for counting the number of occurrences of specific characters. Let’s go through the example of counting number of single character in a specific cell. For this purpose combination of LEN and SUBSTITUTE function is needed, as we did in the similar example of counting the number of characters in the cell without space. Formula syntax will look like:

=LEN(cell)-LEN(SUBSTITUTE(cell;character;""))

In a specific example, if we want to count the number of character s in a defined cell B3, the formula will look like:

=LEN(B3)-LEN(SUBSTITUTE(B3;"s";""))

Let’s explain briefly logic of the function combination. Total character number in a cell B3 is subtracted with character number in the same cell, but without specific character that we want to count. As mentioned in tutorial point 1, SUBSTITUTE function is used to change a string in a defined cell in form without specific character, replacing that character with an empty string.

=SUBSTITUTE(cell;"character";"")

It can be noticed in the final result that function is not counting uppercase characters since LEN function is case sensitive. The solution for counting characters without case sensitive criteria is the usage of UPPER/LOWER function, where all characters will be translated to uppercase/lowercase and function will become case-insensitive.

In the example below, function LOWER is nested into SUBSTITUTE function, changing all string in cell B3 into lowercase, since criteria are defined as lowercase, “s”:

=LEN(cell)-LEN(SUBSTITUTE(LOWER(cell);"lowercase character";""))

=LEN(B3)-LEN(SUBSTITUTE(LOWER(B3);"s";""))

Another solution for making non-case sensitive function is the usage of double nested SUBSTITUTE function in combination with LEN function. In the further example, counting character will be in a specific cell, because sometimes it is not practical to write each time to count a character in the formula, especially if you are dealing with complex ranges and formulas.

Formula with double nested SUBSTITUTE function:

=LEN(cell)-LEN(SUBSTITUTE(SUBSTITUTE(cell;LOWER(character);"");UPPER(character);""))

=LEN(B3)-LEN(SUBSTITUTE(SUBSTITUTE(B3;LOWER(B6);"");UPPER(B6);""))

The formula might be looking complex, but everything will be clear after explanation. Let’s evaluate formula step by step.

First, we want to eliminate the lowercase counting character from the text:

=SUBSTITUTE(B3;LOWER(B6);"")

=SUBSTITUTE(“Sun is shining ”;LOWER(“S”);"")

Function LOWER is put in order to translate counting character into lowercase, and then the +SUBSTITUTE function replaces lowercase character into an empty string. After this step formula result look like: “Sun i hining”.

In the next formula step, the goal is to eliminate the uppercase counting character from the defined text/cell. This is solved by nested SUBSTITUTE function:

=SUBSTITUTE(SUBSTITUTE(B3;LOWER(B6);"");UPPER(B6);"")

We have already explained inside SUBSTITUTE function result “Sun i hining”, and will put it in the function below to make the situation clearer. In first SUBSTITUTE function lowercase character has been replaced with an empty string, and in the second SUBSTITUTE function uppercase counting character is replaced with an empty string, resulting in the text without counting characters “s” and “S”: “un i hining”.

=SUBSTITUTE(“Sun i hining”;UPPER(“S”);"")

LEN function then just counts the number of characters from a modified text:

=LEN(SUBSTITUTE(SUBSTITUTE(B3;LOWER(B6);"");UPPER(B6);""))

=LEN(“un i hining”)

In the final step, evaluated formula result, text without “s” and “S”, is subtracted by the total number of characters in a defined cell:

=LEN(B3)-LEN(SUBSTITUTE(SUBSTITUTE(B3;LOWER(B6);"");UPPER(B6);""))

=LEN(“Sun is shining”) - LEN(“un i hining”)

Count Specific Character in a Range

Whenever we are dealing with cell ranges and arrays, SUMPRODUCT function is needed in combination with other functions. For counting the specific character in a range, for case, sensitive counting, the combination of three functions is used: SUMPRODUCT, LEN, and SUBSTITUTE. For case-insensitive counting, additional formulas should be added: UPPER/LOWER.

First, we will explain counting the number of occurrence of character “S” in a defined range (case insensitive version). A formula is almost similar to formula explaining counting characters. The difference is coming from LEN function nested in SUMPRODUCT function and in counting area, instead of the cell is defined range of cells:

=SUMPRODUCT(LEN(B3:B6))-SUMPRODUCT(LEN(SUBSTITUTE(B3:B6;B9;"")))

For case-insensitive character counting in a defined range, we can use the detailed explained function for case-insensitive character counting in a specific cell in tutorial point 3, with two changes: nesting LEN function in SUMPRODUCT function, and replacing the cell with cell range:

=SUMPRODUCT(LEN(B3:B6))-SUMPRODUCT(LEN(SUBSTITUTE(SUBSTITUTE(B3:B6;LOWER(B9);"");UPPER(B9);"")))

Remember, whenever you are dealing with cell ranges, you will have to use SUMPRODUCT function. For case-sensitive character counting in range combination of functions is needed: SUMPRODUCT, LEN and SUBSTITUTE, and for case-insensitive counting: SUMPRODUCT, LEN, SUBSTITUTE, and UPPER/LOWER functions.

Count Specific Combination of Characters in a Cell or Range

There is also the possibility to count specific character combination in a defined cell or range. In previous tutorial points, we covered single character counting in a cell or range with case sensitive/insensitive alternatives. The formula for counting the combination of characters is the same, only we have to divide it with the number of characters in the character combination.

Let’s take a look in the example below, for counting specific combination of characters in a cell (case insensitive version):

=(LEN(B3)-LEN(SUBSTITUTE(SUBSTITUTE(B3;LOWER(B6);"");UPPER(B6);"")))/LEN(B6)

Logic is the same as for counting single character, only we had to divide regular formula with the number of specific characters that we are counting, easily using the formula: LEN(“in”). Without dividing formula with LEN(“in”), the result would be multiplied with the number of characters in character combination (in our example with 2, since “in” has two characters)

For counting specific combination of characters in a cell (case sensitive version) formula will look like:

=(LEN(B3)-LEN(SUBSTITUTE(B3;B6;"")))/LEN(B6)

Counting combination of characters in a range has the same logic as counting single character, and for the case, sensitive version formula will look like:

=(SUMPRODUCT(LEN(B3:B6))-SUMPRODUCT(LEN(SUBSTITUTE(SUBSTITUTE(B3:B6;LOWER(B9);"");UPPER(B9);""))))/LEN(B9)

Regular formula explained in tutorials topic 4, is divided with the number of specific characters that we are counting, using function LEN.

If we want the case-insensitive version, then formula syntax will look like:

=(SUMPRODUCT(LEN(B3:B6))-SUMPRODUCT(LEN(SUBSTITUTE(B3:B6;B9;""))))/LEN(B9)

Still need some help with Excel formatting or have other questions about Excel? Connect with a live Excel expert here for some 1 on 1 help. Your first session is always free. 

Содержание

  1. Description of formulas to count the occurrences of text, characters, and words in Excel
  2. Summary
  3. More Information
  4. Formula to Count the Number of Occurrences of a Text String in a Range
  5. Example 1: Counting the Number of Occurrences of a Text String in a Range
  6. Formula to Count the Number of Occurrences of a Single Character in One Cell
  7. Example 2: Counting the Number of Occurrences of a Character in One Cell
  8. Formula to Count the Number of Occurrences of a Single Character in a Range
  9. Example 3: Counting the Number of Occurrences of a Character in a Range
  10. Formula to Count the Number of Words Separated by a Character in a Cell
  11. Example 4: Counting the Number of Words Separated by a Space in a Cell
  12. References
  13. Count characters in cells
  14. Give it a try
  15. Count characters in cells with Excel for Mac
  16. Give it a try
  17. How to Count Number of Characters in Excel (3 Easy Ways)
  18. Count Characters In Excel
  19. Count Characters in a Cell
  20. Count Characters in a Cell without Space Characters
  21. Count Characters in a Range
  22. LEN with SUMPRODUCT
  23. With spaces:
  24. Without spaces:
  25. LEN with SUM
  26. With spaces:
  27. Without spaces:
  28. Count Occurrences of a Specific Character
  29. Count Occurrences of a Specific Character in a Cell
  30. Count Occurrences of a Specific Character in a Range
  31. Subscribe and be a part of our 15,000+ member family!

Description of formulas to count the occurrences of text, characters, and words in Excel

Summary

This article contains and describes formulas that calculate the following:

  • The number of occurrences of a text string in a range of cells.
  • The number of occurrences of a character in one cell.
  • The number of occurrences of a character in a range of cells.
  • The number of words (or text strings) separated by a character in a cell.

More Information

Formula to Count the Number of Occurrences of a Text String in a Range

=SUM(LEN(range)-LEN(SUBSTITUTE(range,»text»,»»)))/LEN(«text»)

Where range is the cell range in question and «text» is replaced by the specific text string that you want to count.

The above formula must be entered as an array formula. To enter a formula as an array in Excel for Windows, press CTRL+SHIFT+ENTER. To enter a formula as an array in Excel for Macintosh, press COMMAND+RETURN.

The formula must be divided by the length of the text string because the sum of the character length of the range is decreased by a multiple of each occurrence of the text string. This formula can replace all later formulas in this article except the formula to count the number of words in a cell.

Example 1: Counting the Number of Occurrences of a Text String in a Range

Start Excel, and then open a new workbook.

Type the following on sheet1:

The value of cell A8 is 4 because the text «apple» appears four times in the range.

Formula to Count the Number of Occurrences of a Single Character in One Cell

=LEN(cell_ref)-LEN(SUBSTITUTE(cell_ref,»a»,»»))

Where cell_ref is the cell reference, and «a» is replaced by the character you want to count.

This formula does not need to be entered as an array formula.

Example 2: Counting the Number of Occurrences of a Character in One Cell

Use the same data from the preceding example; assuming you want to count the number of occurrences of the character «p» in A7. Type the following formula in cell A9:

The value of cell A9 is 3 because the character «p» appears three times in A7.

Formula to Count the Number of Occurrences of a Single Character in a Range

=SUM(LEN(range)-LEN(SUBSTITUTE(range,»a»,»»)))

Where range is the cell range in question, and «a» is replaced by the character you want to count.

The above formula must be entered as an array formula. To enter a formula as an array formula in Excel, press CTRL+SHIFT+ENTER.

Example 3: Counting the Number of Occurrences of a Character in a Range

Use the same data from the preceding example; assuming you want to count the number of occurrences or the character «p» in A2:A7. Type the following formula in cell A10:

The above formula must be entered as an array formula. To enter a formula as an array formula in Excel, press CTRL+SHIFT+ENTER.

The value of cell A10 is 11 because the character «p» appears 11 times in A2:A7.

Formula to Count the Number of Words Separated by a Character in a Cell

=IF(LEN(TRIM(cell_ref))=0,0,LEN(cell_ref)-LEN(SUBSTITUTE(cell_ref,char,»»))+1)

Where cell_ref is the cell reference, and char is the character separating the words.

There are no spaces in the above formula; multiple lines are used only to fit the formula into this document. Do not include any spaces when you type it into the cell. This formula does not need to be entered as an array formula.

Example 4: Counting the Number of Words Separated by a Space in a Cell

To count the number of words in a cell where the words are separated by a space character, follow these steps:

Start Excel, and then open a new workbook.

Type the following on sheet1:

The formula in cell A2 returns a value of 4 to reflect that the string contains four words separated by spaces. If words are separated by multiple spaces or if words start or end in a space, it does not matter. The TRIM function removes extra space characters and starting and ending space characters in the text of the cell.

In Excel, you can also use a macro to count the occurrences of a specific character in a cell, or range of cells.

References

For additional information about counting occurrences of text, click the following article number to view the article in the Microsoft Knowledge Base:

89794 How to use Visual Basic for Applications to count the occurrences of a character in a selection in Excel

Источник

Count characters in cells

When you need to count the characters in cells, use the LEN function—which counts letters, numbers, characters, and all spaces. For example, the length of «It’s 98 degrees today, so I’ll go swimming» (excluding the quotes) is 42 characters—31 letters, 2 numbers, 8 spaces, a comma, and 2 apostrophes.

To use the function, enter =LEN( cell ) in the formula bar, then press Enter on your keyboard.

Multiple cells: To apply the same formula to multiple cells, enter the formula in the first cell and then drag the fill handle down (or across) the range of cells.

To get the a total count of all the characters in several cells is to use the SUM functions along with LEN. In this example, the LEN function counts the characters in each cell and the SUM function adds the counts:

Give it a try

Here are some examples that demonstrate how to use the LEN function.

Copy the table below and paste it into cell A1 in an Excel worksheet. Drag the formula from B2 to B4 to see the length of the text in all the cells in column A.

The quick brown fox.

The quick brown fox jumped.

The quick brown fox jumped over the lazy dog.

Count characters in one cell

The formula counts the characters in cell A2, which totals to 27—which includes all spaces and the period at the end of the sentence.

NOTE: LEN counts any spaces after the last character.

Count characters in multiple cells

Press Ctrl+C to copy cell B2, then select cells B3 and B4, and then press Ctrl+V to paste its formula into cells B3:B4.

This copies the formula to cells B3 and B4, and the function counts the characters in each cell (20, 27, and 45).

Count a total number of characters

In the sample workbook, click cell B6.

In the cell, enter =SUM(LEN(A2),LEN(A3),LEN(A4)) and press Enter.

This counts the characters in each of the three cells and totals them (92).

Источник

Count characters in cells with Excel for Mac

When you need to count the characters in cells, use the LEN function. The function counts letters, numbers, characters, and all spaces. For example, the length of «It’s 98 degrees today, so I’ll go swimming» (excluding the quotes) is 42 characters—31 letters, 2 numbers, 8 spaces, a comma, and 2 apostrophes.

To use the function, enter =LEN(cell) in the formula bar and press Enter. In these examples, cell is the cell you want to count, such as B1.

To count the characters in more than one cell, enter the formula, and then copy and paste the formula to other cells.

To count a total number of characters in several cells, use the SUM functions along with LEN. For example, =SUM((LEN( cell1),LEN( cell2),(LEN( cell3)))). In this example, the LEN function counts the characters in each cell and the SUM function adds the counts.

To count certain, specific characters within cells, use the LEN function with the SUBSTITUTE function. For example, if you wanted to know how many lower case Zs were within a cell you’d use this formula: =LEN( cell1)-LEN(SUBSTITUTE( cell1,«z»,»»))

Give it a try

Type the following data into a new Excel worksheet. Start in cell A1.

The quick brown fox

The quick brown fox jumped

The quick brown fox jumped over the lazy dog

Count characters in one cell

In the cell, enter =LEN(A2) and press Enter.

The formula counts of the characters in cell A2, and that number is 19, including all spaces. If you have spaces after the final period, the formula also counts them.

Count characters in multiple cells

Press CONTROL + C to copy cell B2.

Press CONTROL + V to paste its formula into cells B3:B4

This copies the formula to cells B3 and B4, and the function counts the characters in each cell (26, and 44).

Count a total number of characters

In the cell, enter =SUM(LEN(A2),LEN(A3),LEN(A4)) and press Enter.

This counts the characters in each of the three cells and totals them (89).

To count certain, specific characters within cells

In the cell, enter =LEN(A4)-LEN(SUBSTITUTE(A4,»z»,»»)) and press Enter.

In short, this counts all lower case Zs in cell A4, which is 1.

Источник

How to Count Number of Characters in Excel (3 Easy Ways)

Let’s learn how to count the number of characters in Excel. The count could be performed on a single cell and even a range of cells. While learning that, let’s also shed some light on counting specific characters too. This tutorial will teach you all that is mentioned above using the LEN function with different combos of the SUBSTITUTE, SUMPRODUCT, and SUM functions, working together to do all the monotonous counting for you.

Counting characters or words will at its most be helpful from a designing point of view; How many characters are going onto a business card, the number of words going on a brochure, how many characters will fit according to the size of the object, the font, the design. Having it all counted and sorted gives good perspective!

As for specific embedded characters, you may be looking for certain products via product code, a text symbol that signifies a characteristic, etc. However important or inane your reason, we will find out how to count characters in Excel nonetheless so let’s get counting!

Table of Contents

Count Characters In Excel

We will begin with counting the number of characters in Excel. The example we will use is of inside messages in greeting cards. Depending on the size and design of the greeting card, you will have to see which message can fit where. Hence, it will be helpful to see how many characters a message contains. Below is the example sheet:

We will go through on how to count characters in a cell and in a range with the LEN function, which you will be seeing a lot of today.

Count Characters in a Cell

Counting characters in excel can be easily done by using the LEN function. The LEN function returns the number of characters in a text string. Let’s see how that pans out:

Here is the formula we will use to count the number of characters in a cell:

And here is what the applied formula looks like:

The LEN function has been used with a single argument; the reference to the cell for counting the characters in the cell’s text. LEN returns 76 as the number of characters in C4. This count includes space characters. If you want your count to exclude space characters, we’ve got you covered. Read the next segment.

Count Characters in a Cell without Space Characters

If you want the count of the number of characters without space characters, we can slip the SUBSTITUTE function in the LEN function. The SUBSTITUTE function replaces existing text with new text in a text string. The space characters will be swapped for empty text so that the LEN function won’t count the spaces. The formula will look like this:

The SUBSTITUTE function replaces the space characters (» «) in C4 with empty text («»). This way, the text that will be left for the LEN function to count will be Maythisbirthdaybejustthebeginningofayearfilledwithhappymemories. The LEN function returns the counted characters as the outcome.

Count Characters in a Range

If we are to count the number of characters in a range, we may follow something along the lines of adding the individual totals up like:

But while we’re at it, let’s further explore the potential of the LEN function, shall we? We will now show you how to count the number of characters in a range using the LEN and SUMPRODUCT functions and also the LEN and SUM functions together.

LEN with SUMPRODUCT

Here we will combine the LEN and SUMPRODUCT functions to get a total count of characters in a range. The SUMPRODUCT function calculates the products of ranges and then the sum of the products. Further, we are using the SUMPRODUCT function for summing the LEN function’s count as LEN does not calculate arrays on its own. We have 2 formulas below; one counts characters in the range including space characters, the other excludes space characters:

With spaces:

The SUMPRODUCT function is used as a helping hand for the LEN function to operate as an array formula. The job of the LEN function is to calculate the total number of characters in the cells C4:C6 which we sum up using the SUMPRODUCT function.

Without spaces:

Before the LEN and SUMPRODUCT functions get to do their job, the SUBSTITUTE function is used to replace the space characters from C4:C6 with empty characters. The text strings in C4:C6 will then be considered to be without any space characters.

Then the LEN function continues to count the characters and the SUMPRODUCT function sums the values to return 203 as the result.

LEN with SUM

Instinctively the first function that comes to mind for summations is the SUM function and it works just fine with the LEN function too. In fact, it works just like the SUMPRODUCT function above with a small difference. SUMPRODUCT makes the formula work as an array formula but with LEN and SUM, you need to enclose the formula in curly braces to force the formula into an array formula. Let’s see how to do that using the formula below:

With spaces:

Once the formula is added, press the Ctrl + Shift + Enter keys and you will notice curly braces bracketing the formula. This turns it into an array formula so that the LEN function can count the characters in C4:C6 as an array with the SUM function.

Without spaces:

To exclude space characters from the count, we have nested the SUBSTITUTE function to replace all the space characters with empty text. This will leave only letters, numbers, and symbols to be counted. The LEN function counts the characters of each of the cells in C4:C6, the results added by the SUM function. The formula is topped off in the end by hitting the Ctrl + Shift + Enter keys to operate as an array formula and here are the results:

If you’re wondering what happens if the formula isn’t changed into an array formula, you can try and see the result without adding the curly braces. The formula will only return the count of a single cell; the cell that the result is adjacent to, despite the range present in the formula. The curly braces turn it into an array formula so that it can accept the supplied range.

Count Occurrences of a Specific Character

Sometimes you may need to count out a specific character to differentiate some items from others in the list. You could be looking for certain text, numeric code, or a symbol. We will guide you through counting occurrences of a specific character in a cell and in a range and these are methods you can turn towards when sorting and filtering fail you.

Count Occurrences of a Specific Character in a Cell

As an example, we are looking for products in a dataset that are marked down by an asterisk (*). The marked products will show 1 in the results and the unmarked will show 0. We will use the LEN function for the counting and the SUBSTITUTE function for replacing the text. Let’s put it into Excel action. The formula will be:

Using the SUBSTITUTE function, we are replacing the asterisk in C3 with empty text and counting the remnant characters with the LEN function. That brings 7 characters as the count.

It sounds a little questionable up until this point but then we subtract this count from the total character count of C3 which is 8 characters. 8-7=1 which is the result, confirming that C3 does contain an asterisk.

All the codes in our example are 7 characters and a cell not containing an asterisk will compute as 7-7=0.

All the products resulting in 1 from the formula are the marked products and 0s are the unmarked products.

Count Occurrences of a Specific Character in a Range

Utilizing a formula similar to the one used for counting a specific character in a cell, we will put the SUMPRODUCT function and a range into the works to arrive at the count of a specific character in a range. This means we will be using the LEN and SUBSTITUTE functions again along with the SUMPRODUCT function to bring everything together. The formula put together is:

We can use the above formula in our example to find out how many products have been marked with an asterisk. In the formula, all the asterisks in the range C3:C18 have been substituted with empty text by the SUBSTITUTE function. The LEN function counts all the characters in C3:C18 (excluding the asterisks) which would amount to 16 products multiplied by 7-character code, which equals 112 characters.

In the LEN(C3:C18)-LEN(SUBSTITUTE(C3:C18,»*»,»»)) part of the function, the count of 112 is subtracted from the total character count of C3:C18. If we do a quick check of the total count in the sheet, it amounts to 122 characters. 122-112=10 is the outcome of the formula.

But where does the SUMPRODUCT function come in all of this? SUMPRODUCT is the function working to collate the results of the range in the formula and also works to make the LEN function operate as an array formula.

Therefore, we have 10 marked products in our dataset.

Counting down to a characteristic close. Today the LEN function has been quite the friend we can count on (count with, actually). Try using some of these methods next time when faced with something as meticulous as character counting; no one should have to do that alone. And making sure you’re never so forlorn in your Excel adventures, we’ll be back with another facet to explore.

Subscribe and be a part of our 15,000+ member family!

Now subscribe to Excel Trick and get a free copy of our ebook «200+ Excel Shortcuts» (printable format) to catapult your productivity.

Источник

Excel has some amazing text functions that can help you when working with the text data.

In some cases, you may need to calculate the total number of characters in a cell/range or the number of times a specific character occurs in a cell.

While there is the LEN function that can count the number of characters in a cell, you can do the rest as well with a combination of formulas (as we will see later in the examples).

In this tutorial, I will cover different examples where you can count total or specific characters in a cell/range in Excel.

Count All Characters in a Cell

If you simply want to get a total count of all the characters in a cell, you can use the LEN function.

The LEN function takes one argument, which could be the text in double-quotes or the cell reference to a cell that has the text.

For example, suppose you have the dataset as shown below and you want to count the total number of characters in each cell:

Data in which characters need to be counted in each cell

Below is the formula that will do this:

=LEN(A2)

LEN formula to count total number of characters in cells

By itself, the LEN function may not look like much, but when you combine it with other formulas, it can do some wonderful things (such as get the word count in a cell or split first and last name).

Note: LEN function will count all the characters in a cell, be it a special character, numbers, punctuation marks, and space characters (leading, trailing, and double spaces between words).

Since the LEN function counts every character in a cell, sometimes you may get the wrong result in case you have extra spaces in the cell.

For example, in the below case, the LEN function returns 25 for the text in cell A1, while it should have been 22. But since it’s counting extra space characters as well, you get the wrong result.

Character count with spaces

To avoid extra spaces being counted, you can first use the TRIM function to remove any leading, trailing and double spaces and then use the LEN function on it to get the real word count.

Below formula will do this:

=LEN(TRIM(A2))

Using TRIM and LEN to not count extra space characters

Count All Characters in a Range of Cells

You can also use the LEN function to count the total number of characters in an entire range.

For example, suppose we have the same dataset and this time, instead of getting the number of characters in each cell, I want to know how many are there in the entire range.

You can do that using the below formula:

=SUMPRODUCT(LEN(A2:A7)))

Formula to Count all characters in a range of cells

Let me explain how this formula works.

In the above formula, the LEN part of the function takes an entire range of cells and counts the characters in each cell.

The result of the LEN function would be:

{22;21;23;23;23;31}

Each of these numbers represents the character count in the cell.

And when you use the SUMPRODUCT function with it, it would simply add all these numbers.

Now, if you’re wondering why can’t you use SUM instead of SUMPRODUCT, the reason is that this is an array, and SUMPRODUCT can handle array but the SUM function can not.

However, if you still want to use SUM, you can use the below formula (but remember that you need to use the Control + Shift + Enter to get the result instead of a regular Enter)

=SUM(LEN(A2:A7))

Count Specific Characters in a Cell

As I mentioned that the real utility of the LEN function is when it’ used in combination with other formulas.

And if you want to count specific characters in a cell (it could be a letter, number, special character, or space character), you can do that with a formula combination.

For example, suppose you have the dataset as shown below and you want to count the total number of words in each cell.

While there is no in-built formula to get the word count, you can count the space characters and then use it to know the total number of words in the cell.

Below is the formula that will give you the total number of space characters in a cell:

=LEN(A2)-LEN(SUBSTITUTE(A2," ",""))+1

Getting the word count

The above formula counts the total number of space characters and then adds 1 to that number to get the word count.

Here is how this formula works:

  • SUBSTITUTE function is used to replace all the space characters with a blank. The LEN function is then used to count the total number of characters when there are no space characters.
  • The result of the LEN(SUBSTITUTE(A2,” “,””)) is then subtracted from LEN(A2). This gives us the total number of space characters that are there in the cell.
  • 1 is added in the formula and the total number of words would be one more than the total number of space characters (as two words are separated with one character).

Note that in case there are any leading, trailing, or double spaces, you are going to get the wrong result. In such a case, it’s best to use the TRIM function along with the LEN function.

You can also use the same logic to find a specific character or word or phrase in a cell.

For example, suppose I have a dataset as shown below where I have different batches, where each batch has an alphabet and number to represent it (such as A1, J2, etc.)

Data where specific character needs to be counted

Below is the formula that will give you the total number of times a batch with the alphabet A has been created each month:

=LEN(B2)-LEN(SUBSTITUTE(B2,"A",""))

formula to count specific characters in a string

The above formula again uses the same logic – find the length of the text in a cell with and without the character that you want to count and then take the difference of these two.

In the above formula, I have hardcoded the character that I want to count, but you can also put it in a cell and then use the cell reference. This makes it more convenient as the formula would update the next time you change the text in the cell.

Count Specific Characters Using Case-Insensitive Formula

There is one issue with the formula used to count specific characters in a cell.

The SUBSTITUTE function is case sensitive. This means that you “A” is not equal to “a”. This is why you get the wrong result in cell C5 (the result should have been 3).

Case sensitive character count

So how can you get the character count of a specific character when it could have been in any case (lower or upper).

You do that by making your formula case insensitive. While you can go for a complex formula, I simply added the character count of both the cases (lowercase and uppercase A).

=LEN(B2)-LEN(SUBSTITUTE(B2,"A",""))+LEN(B2)-LEN(SUBSTITUTE(B2,"a",""))

Formula to count lower and upper case characters

Count Characters/Digits Before and After Decimal

I don’t know why, but this is a common query I get from my readers and have seen in many forums – such as this one

Suppose you have a dataset as shown below and you want to count the characters before the decimal and after the decimal.

Count characters before and after decimals

Below are the formulas that will do this.

Count characters/numbers before the decimal:

=LEN(INT(A2))

Count characters/numbers after the decimal:

=LEN(A2)-FIND(".",A2)

Formula to count characters before and after decimals

Note that these formulas are meant only for significant digits in the cell. In case you have leading or trailing zeroes or you have used custom number formatting to show more/fewer numbers, the above formulas would still give you significant digits before and after the decimal.

So these are some of the scenarios where you can use formulas to count characters in a cell or a range of cells in Excel.

I hope you found the tutorial useful!

Other Excel tutorials you may like:

  • Count Unique Values in Excel Using COUNTIF Function
  • How to Count Cells that Contain Text Strings
  • How to Count Colored Cells In Excel
  • Count Unique Values in Excel Using COUNTIF Function
  • How To Remove Text Before Or After a Specific Character In Excel

Count Characters in Excel

Count Characters in Excel (Table of Contents)

  • Count Characters in Excel
  • How to Count Characters in Excel?

Count Characters in Excel

Count Characters in Excel is a commonly used method in Excel, this may be because we have some boundaries in excel, or the user may have limited that some characters should only be entered in the cells. This is why we need to understand how to count the number of characters in a cell. In excel, we can count the characters by using the excel built-in function called LEN (Length)

LEN function is a built-in function in excel that is categorized as String or text. This LEN function is normally used to count the characters, which will return the number of characters in a text string. i.e., length of the specified string.

The syntax for the LEN function:

Count Characters example 3-10

Text: which is used to calculate length.

How to Count Characters in Excel?

In the following examples, we will see how to count characters in excel.

You can download this Count-Characters-Excel-Template here – Count-Characters-Excel-Template

Example #1 – Using LEN Function

Consider the simple example where we have a list of names in this where we need to count the number of characters in each cell which is shown below.

Count Characters example 1-1

We will see how to use the LEN function by following the below steps.

  • To use the function, first, enter the formulation
  • =LEN(text), which is shown in the below screenshot.

Count Characters example 1-2

  • The argument text is nothing but the corresponding data that we need to count
  • Here in our example, apply the formula as =LEN(A1)
  • Press enter so that the output will be displayed as follows.

Count Characters example 1-3

  • As we can see in the above screenshot, we got the output as “4”.
  • Drag down the formula to all cells so that we will get the length of the specified string, which is shown below.

Count Characters example 1-4

In the above screenshot, we can see that for the first name “JOHN,” we got the output as 4, and for the second name “Martin Chapel,” we got the output as 13. We can wonder why we got the output as 13; if we check manually, there are only12 words, but we got the output as 13 because the LEN function counts the spaces also; for this reason, we got the output as 13.

Example # 2 – Using String and Numbers

In the above example, we have seen how to count the character using LEN with only String. In this example, we will see how to count the character with the combination of both string and numbers, which is shown below.

Count Characters example 2-1

In the above screenshot, we can see the raw data contain names along with numbers and string and a combination of both string and numbers. Let’s see how the LEN function works by following the below procedure.

  • First, create a new column as output. Use the Len function as =LEN(cell)
  • In this example, apply the LEN function as =LEN(A2), So that it will return the character count as 4, as shown in the below screenshot.

Count Characters example 2-2

  • Now drag down the formula for all the cells. LEN function count not only the characters; it also counts the numbers and returns the exact count.

Count Characters example 2-3

In the above screenshot, we can see that the LEN function returned the exact count for all set of series as we can see in the 2 rows we have numeric “332-56”, so the LEN function counts each text and returned the output as “6” and at the same time we can see the combination of both string and numbers on cell “A5”. Here too, the LEN function returned the exact count of both strings and numbers.

Example #3 – Using Multiple LEN Function

In this example, we are going to see how to use multiple LEN functions to count the arithmetic operators. Consider the below example, which has a combination of string plus arithmetic operator.

Count Characters example 3-1

In the above example, we can see that two columns have been created; one is for to count the number of text, and another column is to count only the arithmetic operator. In order to differentiate the count of both text and operators, we are going to work on this example.

As we have seen in the above example, the LEN function returns and counts the characters along with the spaces. First, let’s apply the same formula in the B column, which is shown below.

Count Characters example 3-2

The above screenshot shows the Count of characters that we have applied using the LEN function. Assume that we need to count only the arithmetic operators. In these cases, we cannot apply the LEN function because the LEN function will count all the text, including spaces, and return the number of the count for the specific data. In order to find how many operators are there in a specific cell, please follow the below procedure.

Consider the below example, which is shown below.

Example 3-3

First, use the LEN function. On a column, C inserts the LEN function as below.

=LEN(A2)-LEN(SUBSTITUTE(A2,”*”,””))

  • In this LEN formula, we have used the SUBSTITUTE function, which replaces the text with new text in a text string.
  • First, we used the LEN function, which will count the characters – LEN(SUBSTITUTE(OLD TEXT, NEW TEXT), i.e. the old text is nothing but the A2 cell, and the new text is “*” so that it will replace the text with a new string that we have specified in the formula and it returns the output as 2 which is shown below.

Example 3-4

  • Now drag down the formula by specifying the new string.

Example 3-5

  • Now we will get the following result.

Example 3-6

  • The result is as below.

Example 3-7

Example #4 – LEN and SUBSTITUTE Function

In this example, we are going to see how to count specific characters by using the same LEN and SUBSTITUTE function. Consider the below example, which contains the sentence “Amazon Big Billion Days Started. Time to shop online.”

Example 3-8

In the above screenshot, we have used the LEN function to count the number of characters. We got the exact count of characters as 53. Assume that we need to count how many “o” are there in the sentence.

We can use the same LEN and SUBSTITUTE formula to find the exact count by following the below steps.

  • Click on the specific column.
  • Enter then LEN function formula as below
  • =LEN(A9)-LEN(SUBSTITUTE(A9,”o”,””))
  • The above formula describes that we have applied the LEN function to count the character – LEN(SUBSTITUTE(OLD TEXT, NEW TEXT), i.e. the old text is nothing but the A9 cell, and new text is “o” where it counts only the specific text we have mentioned, and we got the output as follows.

Example 3-9

Things to Remember About Count Characters in Excel

  • While using the LEN function, make sure that your blank spaces are not used to avoid confusion.
  • LEN function will count and return all the text whatever we have specified in the data.

Recommended Articles

This is a guide to Count Characters in Excel. Here we discuss how to use the Count Characters in Excel along with practical examples and a downloadable excel template. You can also go through our other suggested articles –

  1. COUNTIF Excel Function
  2. Count Names in Excel
  3. Count Formula in Excel
  4. VBA Count

Let’s learn how to count the number of characters in Excel. The count could be performed on a single cell and even a range of cells. While learning that, let’s also shed some light on counting specific characters too. This tutorial will teach you all that is mentioned above using the LEN function with different combos of the SUBSTITUTE, SUMPRODUCT, and SUM functions, working together to do all the monotonous counting for you.

Counting characters or words will at its most be helpful from a designing point of view; How many characters are going onto a business card, the number of words going on a brochure, how many characters will fit according to the size of the object, the font, the design. Having it all counted and sorted gives good perspective!

As for specific embedded characters, you may be looking for certain products via product code, a text symbol that signifies a characteristic, etc. However important or inane your reason, we will find out how to count characters in Excel nonetheless so let’s get counting!

How-To-Count-Number-of-Characters-In-Excel

Count Characters In Excel

We will begin with counting the number of characters in Excel. The example we will use is of inside messages in greeting cards. Depending on the size and design of the greeting card, you will have to see which message can fit where. Hence, it will be helpful to see how many characters a message contains. Below is the example sheet:

Count Number of Characters

We will go through on how to count characters in a cell and in a range with the LEN function, which you will be seeing a lot of today.

Count Characters in a Cell

Counting characters in excel can be easily done by using the LEN function. The LEN function returns the number of characters in a text string. Let’s see how that pans out:

Here is the formula we will use to count the number of characters in a cell:

=LEN(C4)

And here is what the applied formula looks like:

Count Number of Characters in a Cell

The LEN function has been used with a single argument; the reference to the cell for counting the characters in the cell’s text. LEN returns 76 as the number of characters in C4. This count includes space characters. If you want your count to exclude space characters, we’ve got you covered. Read the next segment.

Count Characters in a Cell without Space Characters

If you want the count of the number of characters without space characters, we can slip the SUBSTITUTE function in the LEN function. The SUBSTITUTE function replaces existing text with new text in a text string. The space characters will be swapped for empty text so that the LEN function won’t count the spaces. The formula will look like this:

=LEN(SUBSTITUTE(C4," ",""))

The SUBSTITUTE function replaces the space characters (» «) in C4 with empty text («»). This way, the text that will be left for the LEN function to count will be Maythisbirthdaybejustthebeginningofayearfilledwithhappymemories. The LEN function returns the counted characters as the outcome.

Count Number of Characters in a Cell without Space Characters

Count Characters in a Range

If we are to count the number of characters in a range, we may follow something along the lines of adding the individual totals up like:

=LEN(C4)+LEN(C5)+LEN(C6)

But while we’re at it, let’s further explore the potential of the LEN function, shall we? We will now show you how to count the number of characters in a range using the LEN and SUMPRODUCT functions and also the LEN and SUM functions together.

LEN with SUMPRODUCT

Here we will combine the LEN and SUMPRODUCT functions to get a total count of characters in a range. The SUMPRODUCT function calculates the products of ranges and then the sum of the products. Further, we are using the SUMPRODUCT function for summing the LEN function’s count as LEN does not calculate arrays on its own. We have 2 formulas below; one counts characters in the range including space characters, the other excludes space characters:

With spaces:

=SUMPRODUCT(LEN(C4:C6))

The SUMPRODUCT function is used as a helping hand for the LEN function to operate as an array formula. The job of the LEN function is to calculate the total number of characters in the cells C4:C6 which we sum up using the SUMPRODUCT function.

LEN with SUMPRODUCT

Without spaces:

=SUMPRODUCT(LEN(SUBSTITUTE(C4:C6," ","")))

Before the LEN and SUMPRODUCT functions get to do their job, the SUBSTITUTE function is used to replace the space characters from C4:C6 with empty characters. The text strings in C4:C6 will then be considered to be without any space characters.

Then the LEN function continues to count the characters and the SUMPRODUCT function sums the values to return 203 as the result.

LEN with SUMPRODUCT

LEN with SUM

Instinctively the first function that comes to mind for summations is the SUM function and it works just fine with the LEN function too. In fact, it works just like the SUMPRODUCT function above with a small difference. SUMPRODUCT makes the formula work as an array formula but with LEN and SUM, you need to enclose the formula in curly braces to force the formula into an array formula. Let’s see how to do that using the formula below:

With spaces:

=SUM(LEN(C4:C6))

Once the formula is added, press the Ctrl + Shift + Enter keys and you will notice curly braces bracketing the formula. This turns it into an array formula so that the LEN function can count the characters in C4:C6 as an array with the SUM function.

LEN with SUM

Without spaces:

=SUM(LEN(SUBSTITUTE(C4:C6," ","")))

To exclude space characters from the count, we have nested the SUBSTITUTE function to replace all the space characters with empty text. This will leave only letters, numbers, and symbols to be counted. The LEN function counts the characters of each of the cells in C4:C6, the results added by the SUM function. The formula is topped off in the end by hitting the Ctrl + Shift + Enter keys to operate as an array formula and here are the results:

LEN with SUM

If you’re wondering what happens if the formula isn’t changed into an array formula, you can try and see the result without adding the curly braces. The formula will only return the count of a single cell; the cell that the result is adjacent to, despite the range present in the formula. The curly braces turn it into an array formula so that it can accept the supplied range.

Recommended Reading: Count Non-Blanks cells from a Range

Count Occurrences of a Specific Character

Sometimes you may need to count out a specific character to differentiate some items from others in the list. You could be looking for certain text, numeric code, or a symbol. We will guide you through counting occurrences of a specific character in a cell and in a range and these are methods you can turn towards when sorting and filtering fail you.

Count Occurrences of a Specific Character in a Cell

As an example, we are looking for products in a dataset that are marked down by an asterisk (*). The marked products will show 1 in the results and the unmarked will show 0. We will use the LEN function for the counting and the SUBSTITUTE function for replacing the text. Let’s put it into Excel action. The formula will be:

=LEN(C3)-LEN(SUBSTITUTE(C3,"*",""))

Using the SUBSTITUTE function, we are replacing the asterisk in C3 with empty text and counting the remnant characters with the LEN function. That brings 7 characters as the count.

It sounds a little questionable up until this point but then we subtract this count from the total character count of C3 which is 8 characters. 8-7=1 which is the result, confirming that C3 does contain an asterisk.

All the codes in our example are 7 characters and a cell not containing an asterisk will compute as 7-7=0.

Count Occurrences of a Specific Character in a Cell

All the products resulting in 1 from the formula are the marked products and 0s are the unmarked products.

Count Occurrences of a Specific Character in a Range

Utilizing a formula similar to the one used for counting a specific character in a cell, we will put the SUMPRODUCT function and a range into the works to arrive at the count of a specific character in a range. This means we will be using the LEN and SUBSTITUTE functions again along with the SUMPRODUCT function to bring everything together. The formula put together is:

=SUMPRODUCT(LEN(C3:C18)-LEN(SUBSTITUTE(C3:C18,"*","")))

We can use the above formula in our example to find out how many products have been marked with an asterisk. In the formula, all the asterisks in the range C3:C18 have been substituted with empty text by the SUBSTITUTE function. The LEN function counts all the characters in C3:C18 (excluding the asterisks) which would amount to 16 products multiplied by 7-character code, which equals 112 characters.

In the LEN(C3:C18)-LEN(SUBSTITUTE(C3:C18,»*»,»»)) part of the function, the count of 112 is subtracted from the total character count of C3:C18. If we do a quick check of the total count in the sheet, it amounts to 122 characters. 122-112=10 is the outcome of the formula.

But where does the SUMPRODUCT function come in all of this? SUMPRODUCT is the function working to collate the results of the range in the formula and also works to make the LEN function operate as an array formula.

Count Occurrences of a Specific Character in a Range

Therefore, we have 10 marked products in our dataset.

Counting down to a characteristic close. Today the LEN function has been quite the friend we can count on (count with, actually). Try using some of these methods next time when faced with something as meticulous as character counting; no one should have to do that alone. And making sure you’re never so forlorn in your Excel adventures, we’ll be back with another facet to explore.

Содержание

  • Подсчет знаков
    • Способ 1: подсчет символов
    • Способ 2: подсчет символов в столбце
    • Способ 3: подсчет символов в нескольких ячейках с помощью автосуммы
    • Способ 4: подсчет символов в нескольких ячейках при помощи функции
  • Вопросы и ответы

Подсчет символов в ячейках в Microsoft Excel

Иногда наступает необходимость узнать, сколько символов содержится в конкретной ячейке. Конечно, можно просто подсчитать вручную, но что делать, если элементов много, а подсчет следует проводить с постоянно меняющимся содержимым для определенных целей? Давайте узнаем, как подсчитать количество знаков в Экселе.

Подсчет знаков

Для подсчета символов в Excel существует специальная функция, которая называется «ДЛСТР». Именно с её помощью можно просуммировать знаки в конкретном элементе листа. Существует несколько способов её использования.

Способ 1: подсчет символов

Для того, чтобы произвести подсчет всех знаков, расположенных в ячейке, используем функцию ДЛСТР, так сказать, в «чистом виде».

  1. Выделяем элемент листа, в котором должен будет выводиться результат подсчета. Кликаем на кнопку «Ввести функцию», расположенную в верхней части окна слева от строки формул.
  2. Переход в мастер функций в Microsoft Excel

  3. Запускается Мастер функций. Ищем в нем наименование ДЛСТР и жмем на кнопку «OK».
  4. Переход к функции ДЛСТР в Microsoft Excel

  5. Вслед за этим происходит открытие окна аргументов. Данная функция имеет только один аргумент – адрес конкретной ячейки. Причем нужно заметить, что в отличие от большинства других операторов, этот не поддерживает ввод ссылок на несколько ячеек или на массив. В поле «Текст» вводим вручную адрес элемента, в котором нужно подсчитать символы. Можно сделать по-другому, что будет проще для пользователей. Устанавливаем курсор в поле аргумента и просто кликаем по нужной области на листе. После этого её адрес появится в поле. Когда данные внесены, жмем на кнопку «OK».
  6. Аргументы функции ДЛСТР в Microsoft Excel

  7. Как видим, после этого результат расчета количества знаков выводится на экран.

Результат подсчета количества символов функцией ДЛСТР в Microsoft Excel

Способ 2: подсчет символов в столбце

Для того, чтобы подсчитать количество знаков в столбце или в любом другом диапазоне данных не обязательно прописывать формулу для каждой ячейки в отдельности.

  1. Становимся в нижний правый угол ячейки с формулой. Появляется маркер выделения. Зажимаем левую кнопку мыши и тянем его параллельно той области, в которой хотим подсчитать количество символов.
  2. Маркер выделения в Microsoft Excel

  3. Формула копируется на весь диапазон. Результат сразу же виден на листе.

Примменение автосуммы в Microsoft Excel

Урок: Как сделать автозаполнение в Excel

Способ 3: подсчет символов в нескольких ячейках с помощью автосуммы

Как было сказано выше, аргументом оператора ДЛСТР могут выступать только координаты одной ячейки. Но что делать, если нужно посчитать общую сумму символов в нескольких из них? Для этого очень удобно применить функцию автосуммы.

  1. Подсчитаем количество знаков для каждой отдельной ячейки, как это было описано в предыдущем варианте.
  2. Выделяем диапазон, в котором указано количество символов, и жмем на кнопку «Сумма», расположенную во вкладке «Главная» в блоке настроек «Редактирование».
  3. Примменение автосуммы в Microsoft Excel

  4. После этого общая сумма знаков во всех элементах будет отображена в отдельной ячейке рядом с диапазоном выделения.

Сумма символов всех ячеек в Microsoft Excel

Lumpics.ru

Урок: Как посчитать сумму в Экселе

Способ 4: подсчет символов в нескольких ячейках при помощи функции

В вышеуказанном способе нужно сразу провести расчет для каждого элемента отдельно и только потом подсчитать общую сумму знаков во всех ячейках. Но существует и такой вариант, в котором все расчеты будут проводиться в только одной из них. В этом случае нужно применять составную формулу с использованием оператора СУММ.

  1. Выделяем элемент листа, в который будет выводиться результат. Вводим в него формулу по шаблону:

    =СУММ(ДЛСТР(адрес_ячейки1);ДЛСТР(адрес_ячейки2);…)

  2. Функция СУММ в Microsoft Excel

  3. После того, как функция с адресами всех ячеек, количество символов в которых нужно подсчитать, введена, жмем на кнопку ENTER. На экран выводится общая сумма сложения знаков.

Рассчет суммы функцией символов СУММ в Microsoft Excel

Как видим, существует несколько способов подсчета количества символов в отдельных ячейках, так и общего числа знаков во всех элементах диапазона. В каждом из вариантов данная операция осуществляется при помощи функции ДЛСТР.

Еще статьи по данной теме:

Помогла ли Вам статья?

Понравилась статья? Поделить с друзьями:
  • Can excel compare two columns
  • Can excel calculate correlation
  • Can excel be used for statistics
  • Can excel be used as a database
  • Can excel be updated