• Microsoft Office
  • Microsoft Windows
  • Other Software
    • Microsoft Visual
    • Microsoft Project
    • Microsoft Visio
  • Anti Virus
  • Blog
    • Word
    • Excel
    • Powerpoint
    • Software tricks/tips
  • POLICIES
    • PAYMENT GUIDE
    • SHIPPING POLICY
    • REFUND POLICY
    • TERMS & CONDITIONS
    • Contact Us

No products in the cart.

  • Microsoft Office
  • Microsoft Windows
  • Other Software
    • Microsoft Visual
    • Microsoft Project
    • Microsoft Visio
  • Anti Virus
  • Blog
    • Word
    • Excel
    • Powerpoint
    • Software tricks/tips
  • POLICIES
    • PAYMENT GUIDE
    • SHIPPING POLICY
    • REFUND POLICY
    • TERMS & CONDITIONS
    • Contact Us

No products in the cart.

  • Microsoft Office
  • Microsoft Windows
  • Other Software
    • Microsoft Visual
    • Microsoft Project
    • Microsoft Visio
  • Anti Virus
  • Blog
    • Word
    • Excel
    • Powerpoint
    • Software tricks/tips
  • POLICIES
    • PAYMENT GUIDE
    • SHIPPING POLICY
    • REFUND POLICY
    • TERMS & CONDITIONS
    • Contact Us

No products in the cart.

  • Microsoft Office
  • Microsoft Windows
  • Other Software
    • Microsoft Visual
    • Microsoft Project
    • Microsoft Visio
  • Anti Virus
  • Blog
    • Word
    • Excel
    • Powerpoint
    • Software tricks/tips
  • POLICIES
    • PAYMENT GUIDE
    • SHIPPING POLICY
    • REFUND POLICY
    • TERMS & CONDITIONS
    • Contact Us
Excel

How to count the number of occurrences of a character in Excel?

0 Comments

There are times when you need to count the number of occurrences of a value or character in a spreadsheet. For example, counting the number of workdays, the number of shifts worked, or the number of products sold in a day, a month, etc. If you have a large amount of data, you can’t count manually. In this case, use the COUNT function in Excel to save time and effort. This article from Buffcom.net will guide you on how to use the functions in Excel to count the number of occurrences of a character.

For example, we have the following data table. The requirement is to count the number of times the character “n” appears in those names.

How to count the number of occurrences of a character in Excel?

How to count the number of occurrences of a character in Excel?

To perform this task, we need to combine 2 functions: LEN and SUBSTITUTE. First, let’s explore the structure of these 2 functions.

1. LEN function

The LEN function in Excel is used to measure the length of a character string and returns the exact number of characters in the character string, including spaces.
Function syntax: =LEN(text)

Where:
Text: required argument, is the text that you want to count the number of characters.

Note: Spaces are also counted as characters by the function.

Applying to the above example, we just need to enter the formula =LEN(A2) to quickly count the number of characters, including spaces, in cell A2 as 16.

How to count the number of occurrences of a character in Excel?

How to count the number of occurrences of a character in Excel?

2. SUBSTITUTE function

The SUBSTITUTE function is used in Excel to replace the old text string with a new text string.
Function syntax: =SUBSTITUTE(text, old_text, new_text, [instance_num])

Where:

  • Text: required argument, is the text or cell reference that you want to replace the characters in.
  • Old_text: required argument, is the text you want to replace.
  • New_text: required argument, is the text you want to replace old_text with.
  • Instance_num: optional argument, specifies the number of times you want to replace old_text with new_text.

 

Applying to the above example, we just need to enter the formula =SUBSTITUTE(A2;B2;””) to quickly remove the character “n” from the name in cell A2.

How to count the number of occurrences of a character in Excel?

How to count the number of occurrences of a character in Excel?

3. Count the number of occurrences of a character in a cell

To count the number of times the character “n” appears in a cell, enter the formula as follows:

=LEN(A2)-LEN(SUBSTITUTE(A2;B2;""))

This formula counts the number of characters in cell A2, then subtracts the number of characters in cell A2 after removing the character “n”. This will return the number of times the character “n” appears.

How to count the number of occurrences of a character in Excel?

How to count the number of occurrences of a character in Excel?

4. Count the number of occurrences of a character in a data array
If you want to count the number of times the character “n” appears in an entire column of names at once, enter the formula as follows:

=SUMPRODUCT(LEN(A2:A7)-LEN(SUBSTITUTE(A2:A7;"n";"")))

As you can see, the result will return 12, which is the same as the total result returned above.

How to count the number of occurrences of a character in Excel?

How to count the number of occurrences of a character in Excel?

So, the article above has guided you on how to count the number of times a character appears in Excel. Hopefully, the article will be useful for you in your work. Wish you success!

Rate this post
25
226 Views
4 essential Excel spreadsheet editing operations you should know by heartPrev4 essential Excel spreadsheet editing operations you should know by heartMarch 8, 2023
Calculate the number of days between two dates in ExcelMarch 8, 2023Calculate the number of days between two dates in ExcelNext

Leave a Reply Cancel reply

You must be logged in to post a comment.

Buy Windows 11 Professional MS Products CD Key
Buy Office 2021 Professional Plus Key Global For 5 PC
Top rated products
  • Kaspersky Total Security 2021 1 year 1 device key Global Kaspersky Total Security 2021 1 year 1 device key Global
    Rated 5.00 out of 5
    $27.00
  • Avast Ultimate Suite 2021 2 Years 10 Devices Global Avast Ultimate Suite 2021 2 Years 10 Devices Global
    Rated 5.00 out of 5
    $77.00
  • Buy Windows 11 Pro CD Key License Buy Windows 11 Pro CD Key License
    Rated 5.00 out of 5
    $6.00
  • Kaspersky Total Security 2021 1 year 5 devices key Global Kaspersky Total Security 2021 1 year 5 devices key Global
    Rated 5.00 out of 5
    $46.00
  • Avast Premium Security 2021 Avast Premium Security 2021 1 Device 1 Year Global
    Rated 5.00 out of 5
    $11.00
Products
  • AVG Internet Security 2021 10 Devices 1 Year Global AVG Internet Security 2021 10 Devices 1 Year Global
    Rated 5.00 out of 5
    $30.00
  • Windows 11 Home Key Global 2021 Windows 11 Home Key Global 2021
    Rated 5.00 out of 5
    $6.00
  • Windows Server 2012 R2 Standard Key Global Windows Server 2012 R2 Standard Key Global
    Rated 4.78 out of 5
    $15.00
  • Buy Office 2021 Professional Plus Key Global For 5 PC Buy Office 2021 Professional Plus Key Global For 5 PC
    Rated 5.00 out of 5
    $68.00
  • Microsoft Visio Standard 2021 Key 1PC Microsoft Visio Standard 2021 Key 1PC $13.00
  • Kaspersky Small Office Security 20 PCs + 20 Mobiles + 2 Servers 1 Year Kaspersky Small Office Security 20 PCs + 20 Mobiles + 2 Servers 1 Year $284.73
  • Windows 11 Pro Key Global Windows 11 Pro Key Global
    Rated 5.00 out of 5
    $6.00
  • 5 Key Windows 10 Pro Key Global - Combo 5 KEY 5 Key Windows 10 Pro Key Global - Combo 5 KEY
    Rated 4.81 out of 5
    $25.00
  • Windows Server 2016 Datacenter Key Global Windows Server 2016 Datacenter Key Global
    Rated 4.74 out of 5
    $10.00
  • Microsoft Office 2019 Home and Student for PC Key Global bind to your Microsoft account Microsoft Office 2019 Home and Student for PC Key Global bind to your Microsoft account
    Rated 4.95 out of 5
    $58.00
Product categories
  • Anti Virus
  • Microsoft Office
  • Microsoft Project
  • Microsoft Visio
  • Microsoft Visual
  • Microsoft Windows
  • Other Software
  • Uncategorized

Buffcom.net always brings the best digital products and services to you. Specializing in Office Software and online marketing services

BIG SALE 50% IN MAY

Microsoft Office
Microsoft Windows
Anti-Virus
Contact Us

Visit Us:

125 Division St, New York, NY 10002, USA

Mail Us:

buffcom.net@gmail.com

TERMS & CONDITIONS | PAYMENT GUIDE  | SHIPPING POLICY  | REFUND POLICY

Copyright © 2019 buffcom.net  All Rights Reserved.