• 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

Counting Specific Characters in Excel (Excel Formula)

0 Comments

Counting Specific Characters in Excel (Excel Formula). To count the occurrence of a specific character in Excel, you can use the combination of SUBSTITUTE and LEN functions. The LEN function counts the total characters, and the SUBSTITUTE function removes the character you want to count from the main value.

Counting Specific Characters in Excel (Excel Formula)

Then, you can count the total characters again and compare the counts to get the occurrence of the specific character. Here’s an example:Excel Formula 1

Suppose you have a long sentence in cell A1, and you want to count how many times the letter “e” occurs. Excel Formula 2To do this, you can use the following formula in cell B1:

=LEN(A1)-LEN(SUBSTITUTE(A1,”e”,””))Excel Formula 3

This formula subtracts the length of the original sentence with the length of the sentence after removing all “e” characters. The result is the count of “e” characters in the sentence.

To verify the formula, you can run a loop through all the characters in cell A1 using VBA:

Sub LoopString()

Dim Counter As Integer

Dim MyString As String

Dim i As Integer

MyString = Range(“A1”).Value

For Counter = 1 To Len(MyString)

If Mid(MyString, Counter, 1) = “e” Then

i = i + 1

End If

Next

MsgBox i

End Sub

The formula works by first counting the total number of characters in cell A1 using the LEN function. Excel Formula 4Then, the SUBSTITUTE function replaces all “e” characters in the sentence with a blank character, and the LEN function is wrapped around this result to count the total characters without the “e” characters. Excel Formula 5Finally, the count of “e” characters is obtained by subtracting the second count from the first count.

Rate this post
29
259 Views
Counting >0 with Excel's COUNTIF FunctionPrevCounting >0 with Excel's COUNTIF FunctionApril 27, 2023
How to Count Total Number of Cells in ExcelApril 27, 2023How to Count Total Number of Cells 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
  • AVG Internet Security 2021 1 Device 1 Year Global AVG Internet Security 2021 1 Device 1 Year Global
    Rated 5.00 out of 5
    $11.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
  • Avast SecureLine VPN 2021 2 Years 5 Devices Global Avast SecureLine VPN 2021 2 Years 5 Devices Global
    Rated 5.00 out of 5
    $47.00
  • Windows 11 Pro Product Activation Key Windows 11 Pro Product Activation Key
    Rated 5.00 out of 5
    $6.00
  • 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
Products
  • Windows 11 Pro Key Global Windows 11 Pro Key Global
    Rated 5.00 out of 5
    $6.00
  • Windows 10 Home OEM Key Global Windows 10 Home OEM Key Global
    Rated 4.80 out of 5
    $6.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
  • 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
  • Microsoft Visio Professional 2016 Key 1PC Microsoft Visio Professional 2016 Key 1PC $9.00
  • Windows 10 Pro Key Global 20 PC Windows 10 Pro Key Global 20 PC $50.00
  • Windows Server 2025 Remote Desktop Services 50 User Connections Windows Server 2025 Remote Desktop Services 50 User Connections $25.00
  • Kaspersky Premium - 1 Device 1 Year - GLOBAL Kaspersky Premium - 1 Device 1 Year - GLOBAL $37.00
  • Buy Windows 11 Home CD Key Global Buy Windows 11 Home CD Key Global
    Rated 4.73 out of 5
    $6.00
  • Microsoft Office Professional Plus 2010 retail Microsoft Office Professional Plus 2010 retail CD Key Global
    Rated 4.90 out of 5
    $11.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.