• 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 Cells with Text in Excel

0 Comments

How to Count Cells with Text in Excel. Recently, one of my readers asked for a simple formula to count cells with text in Excel. There are various formulas available to count all cells containing text values, but the best one to use depends on the situation.

It’s important to note that cells with text include those without numbers, blank cells, or errors. In this post, I’ll share six different ways to count cells with text in different scenarios.

COUNTIF with Wildcard Characters

The best formula to count cells with text is COUNTIF with a wildcard character (* – Asterisk). For example, if you have a list of names and mobile numbers in a single column, you can use the formula:

=COUNTIF(A2:A20,”*”)Count Cells 1

This formula counts only the cells with text. When using an asterisk as the criteria, COUNTIF will count cells with any number of characters, except for logical values, numbers (if they are not entered as text), and errors.

Note: If there are blank spaces within the cells, they will also be counted as text. To exclude these, use the formula:

=COUNTIFS(A2:A20,”*”,A2:A20,”<> “)

SUMPRODUCT and ISTEXT

To count the number of cells with text, you can also use the formula =SUMPRODUCT(–ISTEXT(A2:A20)). This formula checks if a cell contains text or not and returns an array with TRUE for cells with text and FALSE for all others.Count Cells 2

The double minus sign is added to convert the TRUE/FALSE array into 1/0, where 1 represents cells with text and 0 represents all others. The SUMPRODUCT function then sums the array, resulting in the total number of cells that have text in them.

Using SUMPRODUCT has the advantage of not requiring the formula to be entered as an array.

Counting Cells with Specific Text in Excel

If you need to count cells that contain a specific text or partial text, there are several methods you can use in Excel. In this article, we will discuss some of the most common methods.

Using the COUNTIF Function

The COUNTIF function is a simple and straightforward method for counting cells with specific text. To use this function, you need to specify the range of cells you want to count and the text you are looking for. For example, to count the number of cells that contain the text “John” in the range A2:A20, you would use the following formula:

=COUNTIF(A2:A20,”John”)Count Cells 3

This formula will return the number of cells that contain the text “John”.

Using Wildcard Characters

If you need to count cells with partial text, you can use the COUNTIF function along with wildcard characters. The asterisk (*) is a wildcard character that represents any number of characters. For example, to count the number of cells that contain the text “Product-A” in the range A2:A20, you would use the following formula:

=COUNTIF(A2:A20,”Product-A*”)Count Cells 4

This formula will return the number of cells that contain the text “Product-A”.

Using a Case-Sensitive Count

If you need to count cells with specific text in a case-sensitive manner, you can use the EXACT and SUMPRODUCT functions. The EXACT function compares two text strings and returns TRUE if they are exactly the same, and FALSE otherwise. The SUMPRODUCT function returns the sum of the product of corresponding elements in one or more arrays. To count the number of cells that contain the text “JOHN” in capital letters in the range A1:A20, you would use the following formula:

=SUMPRODUCT(–EXACT(“JOHN”,A1:A20))Count Cells 5

This formula will return the number of cells that contain the text “JOHN” in capital letters.

Using VBA Macros

Using a VBA macro can be a time-saving method for counting cells with text. The following VBA codes will help you count the number of cells with text in either the selection or the entire worksheet.

For selection:

Sub countTextSelection()

Dim rng As Range

Dim i As Integer

For Each rng In Selection

If Application.WorksheetFunction.IsText(rng) Then

i = i + 1

End If

Next rng

MsgBox i

End Sub

For entire worksheet:

Sub countTextWorksheet()

Dim rng As Range

Dim i As Integer

For Each rng In ActiveSheet.UsedRange

If Application.WorksheetFunction.IsText(rng) Then

i = i + 1

End If

Next rng

MsgBox i

End Sub

Conclusion

These are some of the most common methods for counting cells with specific text or partial text in Excel. The method you choose will depend on your specific needs and preferences. For most situations, the COUNTIF function is sufficient, but if you need to be more specific or want to save time, the other methods may be more useful. Do you have any other methods to share for counting cells with text? Let us know in the comments below.

Rate this post
26
246 Views
How to Count Non-Blank Cells in ExcelPrevHow to Count Non-Blank Cells in ExcelApril 26, 2023
The Most Popular Financial Functions In ExcelApril 26, 2023The Most Popular Financial Functions 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
  • Avast Premium Security 2021 10 Devices 1 Year Global Avast Premium Security 2021 10 Devices 1 Year Global
    Rated 5.00 out of 5
    $28.00
  • Avast Ultimate Suite 2021 3 Years 10 Devices Global Avast Ultimate Suite 2021 3 Years 10 Devices Global
    Rated 5.00 out of 5
    $90.00
  • Windows Server 2022 Remote Desktop Services Device Connections (50) Cal Key Global Windows Server 2022 Remote Desktop Services Device Connections (50) Cal Key Global
    Rated 5.00 out of 5
    $22.00
  • Kaspersky Internet Security 2021 1 year 1 device key Global Kaspersky Internet Security 2021 1 year 1 device key Global
    Rated 5.00 out of 5
    $24.00
  • Kaspersky Internet Security 2021 1 year 5 devices key Global Kaspersky Internet Security 2021 1 year 5 devices key Global
    Rated 5.00 out of 5
    $45.00
Products
  • Windows Server 2025 Remote Desktop Services 50 Device Connections Windows Server 2025 Remote Desktop Services 50 Device Connections $25.00
  • Windows Server 2016 Datacenter Key Global Windows Server 2016 Datacenter Key Global
    Rated 4.74 out of 5
    $10.00
  • Avast Premium Security 2021 10 Devices 1 Year Global Avast Premium Security 2021 10 Devices 1 Year Global
    Rated 5.00 out of 5
    $28.00
  • Buy Office 2021 Professional Plus Key Global Bind To Your Microsoft Account Buy Office 2021 Professional Plus Key Global Bind To Your Microsoft Account
    Rated 4.71 out of 5
    $99.00
  • Windows Server 2025 Standard Windows Server 2025 Standard $30.00
  • Microsoft Visio Professional 2010 Key 1PC Microsoft Visio Professional 2010 Key 1PC $9.00
  • Microsoft Visual Studio 2019 Professional Key Microsoft Visual Studio 2019 Professional Key
    Rated 4.84 out of 5
    $15.00
  • Microsoft Office Professional Plus 2010 retail Microsoft Office Professional Plus 2010 retail Key Global - 5 PC
    Rated 4.96 out of 5
    $15.00
  • Avast Ultimate Suite 2021 3 Years 10 Devices Global Avast Ultimate Suite 2021 3 Years 10 Devices Global
    Rated 5.00 out of 5
    $90.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
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.