To count the number of cells containing text in Excel, you can use the COUNTIF function or combine ISTEXT and SUMPRODUCT to achieve more accurate statistics. 1. Use the COUNTIF function: =COUNTIF(range,"*") to quickly count cells containing any character, but empty strings will be counted; 2. Use =SUMPRODUCT(--ISTEXT(A1:A10)) to exclude non-text content, ensuring that only cells that are truly text are counted. Be careful to avoid selecting whole columns, checking blanks and data formats, and selecting appropriate methods according to actual needs.
In Excel, counting the number of cells containing text does not require counting one by one. Just use the right function and you can do it quickly.

Use COUNTIF function to count cells containing text
This is one of the most direct methods. The COUNTIF function can count the number of cells that meet the criteria based on the specified criteria.
To count cells containing text in a certain area, you can use the following formula:
=COUNTIF(range,"*")
Here *
is a wildcard that represents any number of characters (except null values). For example, if you want to count cells with text in A1:A10, write it as:

=COUNTIF(A1:A10,"*")
It should be noted that if the cell is a space or the null value returned by the formula (such as ""
), this formula will also count it. So if you only want to count text cells that have "really content", it is recommended to use them in combination with other functions.
Accurate statistics combined with ISTEXT and SUMPRODUCT
If you want to exclude empty strings or error data, you can use the ISTEXT function and SUMPRODUCT to achieve more accurate judgment.
For example, if the content that is really text in statistics A1:A10 can be written like this:

=SUMPRODUCT(--ISTEXT(A1:A10))
Let's explain:
- ISTEXT will determine whether each cell is text one by one, returning TRUE or FALSE.
- Double minus sign
--
converts the logical value to the number 1 or 0. - SUMPRODUCT Adds up all the results, which is the number of text cells.
Although this method is a little more complex than COUNTIF, it is more accurate and is especially suitable for handling situations where the data source is not clean enough.
Notes and FAQs
- When the cell is blank but displayed as "", COUNTIF will consider it to have content;
- If you are not sure about the data format, it is recommended to use ISBLANK to troubleshoot it first;
- Try not to select the entire column (such as A:A) in the range in the formula, as it will affect the calculation speed;
- Non-text types such as numbers and dates are not recognized as text by ISTEXT.
Basically these are the methods, not complicated but it is easy to ignore details. Just choose the right method according to your data situation.
The above is the detailed content of How to count cells with text in Excel. For more information, please follow other related articles on the PHP Chinese website!

Hot AI Tools

Undress AI Tool
Undress images for free

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

Quick Links Copy, Move, and Link Cell Elements

Quick Links Let Copilot Determine Which Table to Manipu

1. Check the automatic recovery folder, open "Recover Unsaved Documents" in Word or enter the C:\Users\Users\Username\AppData\Roaming\Microsoft\Word path to find the .asd ending file; 2. Find temporary files or use OneDrive historical version, enter ~$ file name.docx in the original directory to see if it exists or log in to OneDrive to view the version history; 3. Use Windows' "Previous Versions" function or third-party tools such as Recuva and EaseUS to scan and restore and completely delete files. The above methods can improve the recovery success rate, but you need to operate as soon as possible and avoid writing new data. Automatic saving, regular saving or cloud use should be enabled

Microsoft Teams is not complicated to use, you can get started by mastering the basic operations. To create a team, you can click the "Team" tab → "Join or Create Team" → "Create Team", fill in the information and invite members; when you receive an invitation, click the link to join. To create a new team, you can choose to be public or private. To exit the team, you can right-click to select "Leave Team". Daily communication can be initiated on the "Chat" tab, click the phone icon to make voice or video calls, and the meeting can be initiated through the "Conference" button on the chat interface. The channel is used for classified discussions, supports file upload, multi-person collaboration and version control. It is recommended to place important information in the channel file tab for reference.

MicrosoftTeamsusesalotofmemoryprimarilybecauseitisbuiltonElectron,whichrunsmultipleChromium-basedprocessesfordifferentfeatureslikechat,videocalls,andbackgroundsyncing.1.Eachfunctionoperateslikeaseparatebrowsertab,increasingRAMusage.2.Videocallswithef

Grouping by month in Excel Pivot Table requires you to make sure that the date is formatted correctly, then insert the Pivot Table and add the date field, and finally right-click the group to select "Month" aggregation. If you encounter problems, check whether it is a standard date format and the data range are reasonable, and adjust the number format to correctly display the month.

MicrosoftTeams’freeversionlimitsmeetingsto60minutes.1.Thisappliestomeetingswithexternalparticipantsorwithinanorganization.2.Thelimitdoesnotaffectinternalmeetingswhereallusersareunderthesameorganization.3.Workaroundsincludeendingandrestartingthemeetin

Quick Links Check the File's AutoSave Status
