• Microsoft Office
  • Microsoft Windows
  • Other Software
  • 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
  • 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
  • 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
  • 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.

2
54 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

Your email address will not be published. Required fields are marked *

Recent Posts
  • Retrieve Data Based on Data Validation
    September 7, 2023
    Excel
  • How to Convert Multiple Rows to Columns and Rows in Excel?
    September 6, 2023
    Excel
  • VLOOKUP for Automatic Discount in Data Validation
    September 6, 2023
    Excel
  • How to Convert Text Dates to Dates in Excel?
    September 5, 2023
    Excel
Categories
  • Blog 80
  • Excel 754
  • Powerpoint 36
  • Software tricks/tips 128
  • Uncategorized 8
  • Word 109
Tags
the ISERROR
Top rated products
  • Trend Micro Internet Security 3 Devices 1 Year Key GLOBAL Trend Micro Internet Security 3 Devices 1 Year Key GLOBAL
    Rated 5.00 out of 5
    $17.00
  • Windows 11 Pro Key Global
    Rated 5.00 out of 5
    $11.00
  • AVG Internet Security 2021 10 Devices 2 Years Global AVG Internet Security 2021 10 Devices 2 Years Global
    Rated 5.00 out of 5
    $42.20
  • Trend Micro Maximum Security 3 Devices 1 Year key Global Trend Micro Maximum Security 3 Devices 1 Year key Global
    Rated 5.00 out of 5
    $15.00
  • Windows 11 Home Key Global 2021
    Rated 5.00 out of 5
    $15.00
Products
  • Buy Office 2021 Professional Plus Key Global For 5 PC
    Rated 5.00 out of 5
    $45.00
  • Buy Office 2021 Professional Plus Key Global Bind To Your Microsoft Account
    Rated 4.83 out of 5
    $49.00
  • Windows Server 2022 Datacenter Key Global
    Rated 5.00 out of 5
    $15.00
  • Windows Server 2022 Standard Key Global
    Rated 4.47 out of 5
    $15.00
  • Windows Server 2022 Remote Desktop Services Device Connections (50) Cal Key Global
    Rated 5.00 out of 5
    $45.00

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.