• 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
22
255 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
  • Kaspersky Small Office Security 15 PCs + 15 Mobiles + 2 Servers 1 Year Kaspersky Small Office Security 15 PCs + 15 Mobiles + 2 Servers 1 Year
    Rated 5.00 out of 5
    $201.00
  • Buy Windows 11 Professional MS Products CD Key Buy Windows 11 Professional MS Products CD Key
    Rated 5.00 out of 5
    $6.00
  • 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
Products
  • 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
  • Windows Server 2025 Remote Desktop Services 50 User Connections Windows Server 2025 Remote Desktop Services 50 User Connections $25.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 10 Home OEM Key Global Windows 10 Home OEM Key Global
    Rated 4.80 out of 5
    $6.00
  • Microsoft Visual Studio Enterprise 2022 For 1 PC Microsoft Visual Studio Enterprise 2022 For 1 PC $19.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
  • Microsoft SQL Server 2019 Enterprise Microsoft SQL Server 2019 Enterprise $39.00
  • Buy Windows 11 Pro CD Key License Buy Windows 11 Pro CD Key License
    Rated 5.00 out of 5
    $6.00
  • Microsoft Office Professional Plus 2019 CD Key Global Microsoft Office Professional Plus 2019 CD Key Global - 5 PC
    Rated 4.92 out of 5
    $32.00
  • Windows Server 2012 R2 Datacenter Key Global Windows Server 2012 R2 Datacenter Key Global
    Rated 4.71 out of 5
    $15.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.