Skip to content
xlsoffice. All Rights Reserved
  • Home
  • Excel For Beginners
  • Excel Intermediate
  • Advanced Excel For Experts

Lookup and Reference Examples

  • Merge tables with VLOOKUP in Excel
  • How to use Excel VLOOKUP Function
  • MATCH function: Description, Usage, Syntax, Examples and Explanation
  • How to use Excel COLUMN Function
  • Perform case-sensitive Lookup in Excel

Data Analysis Examples

  • How To Insert and Customize Sparklines in Excel
  • Conditional Formatting New Rule with Formulas in Excel
  • Conditional Formatting Color Scales Examples in Excel
  • Everything about Charts in Excel
  • Excel Line Chart

Data Validation Examples

  • Excel Data validation number multiple 100
  • Excel Data validation must contain specific text
  • Excel Data validation must not contain
  • Excel Data validation specific characters only
  • Prevent invalid data entering in specific cells

Count cells that contain text in Excel

by

This tutorial shows how to Count cells that contain text in Excel using the example below;

Formula

=COUNTIF(range,"*")

Explanation

To count the number of cells that contain text (i.e. not numbers, not errors, not blank), use the COUNTIF function and a wildcard.

“*” is a wildcard matching any number of characters.

Do you want to count cells that contain specific text? See this formula instead.

In the example, the active cell contains this formula:

=COUNTIF(B4:B8,"*")

How this formula works

COUNTIF counts the number of cells that match the supplied criteria. In this case, the criteria is supplied as the wildcard character “*” which matches any number of text characters.

Worked Example:   Count cells equal to case sensitive in Excel

A few notes:

  • The logical values TRUE and FALSE are not counted as text
  • Numbers are not counted by “*” unless they are entered as text
  • A blank cell that begins with an apostrophe (‘) will be counted.
Worked Example:   SUMPRODUCT with IF in Excel

COUNTIFS solution

If you need to restrict counts to meet more specific criteria, you can switch to the COUNTIFs function. For example, to count cells with text, but exclude cells with only a space character, you could use:

=COUNTIFS(range,"*",range,"<> ")

SUMPRODUCT solution

You can also use SUMPRODUCT to count text values along with the function ISTEXT like so:

=SUMPRODUCT(--ISTEXT(range))

The double hyphen (called a double unary) coerces the result of ISTEXT from a logical value of TRUE or FALSE, to 1’s and 0’s. SUMPRODUCT then returns the sum of ones and zeros.

Post navigation

Previous Post:

Count cells between dates in Excel

Next Post:

Count cells that do not contain in Excel

Leave a Reply Cancel reply

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

Learn Basic Excel

Ribbon
Workbook
Worksheets
Format Cells
Find & Select
Sort & Filter
Templates
Print
Share
Protect
Keyboard Shortcuts

Categories

  • Charts
  • Data Analysis
  • Data Validation
  • Excel Functions
    • Cube Functions
    • Database Functions
    • Date and Time Functions
    • Engineering Functions
    • Financial Functions
    • Information Functions
    • Logical Functions
    • Lookup and Reference Functions
    • Math and Trig Functions
    • Statistical Functions
    • Text Functions
    • Web Functions
  • Excel VBA
  • Excel Video Tutorials
  • Formatting
  • Grouping
  • Others
  • How to find and replace multiple values at same time in Excel
  • DOLLAR function: Description, Usage, Syntax, Examples and Explanation
  • REPLACE, REPLACEB functions: Description, Usage, Syntax, Examples and Explanation
  • T function: Description, Usage, Syntax, Examples and Explanation
  • How to check cell contains which things in Excel
  • Calculate expiration date in Excel
  • How to get same date next year or previous year in Excel
  • How to get same date next month or previous month in Excel
  • Count birthdays by month in Excel
  • Get date from day number in Excel
  • EFFECT function: Description, Usage, Syntax, Examples and Explanation
  • COUPNUM function: Description, Usage, Syntax, Examples and Explanation
  • YIELD function: Description, Usage, Syntax, Examples and Explanation
  • How to calculate simple interest in Excel
  • Bond valuation example in Excel
© 2022 xlsoffice . All Right Reserved. | Teal Smiles