How Can I Count Cells With Text in Excel? The Complete Guide to COUNTIF, COUNTA, and SUMPRODUCT

Learn how can i count cells with text in Excel using COUNTIF, COUNTA, and SUMPRODUCT. Step-by-step formulas, examples, and pitfalls explained for 2026.

Microsoft ExcelBy Katherine LeeMay 31, 202617 min read
How Can I Count Cells With Text in Excel? The Complete Guide to COUNTIF, COUNTA, and SUMPRODUCT

If you have ever stared at a spreadsheet and wondered how can i count cells with text in Excel, you are not alone. Counting text entries is one of the most common tasks for analysts, accountants, students, and small-business owners alike. Whether you are tallying survey responses, tracking attendance, or auditing a product list, Excel gives you several reliable functions to do the job. This guide walks through every method, from the simple COUNTA function to flexible COUNTIF wildcards and the powerful SUMPRODUCT formula, so you can pick the right tool for any situation.

The reason this question comes up so often is that Excel treats text and numbers very differently under the hood. A cell containing the word "apple" behaves nothing like a cell containing the number 42, and a blank-looking cell may actually hold an invisible space or an empty string returned by a formula. Understanding these distinctions is the first step toward counting text accurately. Get the distinction wrong and your totals will be off by dozens of rows, which can quietly corrupt a report you submit to a manager or client.

People searching for spreadsheet help often type unrelated phrases into search engines, and you may have noticed terms like excellence playa mujeres or vlookup excel surfacing near tutorials. Those phrases reflect how broad search traffic is, but the practical need is the same: a clear, working formula. Throughout this article we focus strictly on counting text, and we connect the techniques to related skills you may want next, such as building lookups, validating data entry, and protecting your finished work from accidental edits.

To set expectations, there is no single "count text" button in Excel. Instead, you combine functions. COUNTA counts every non-empty cell regardless of type. COUNTIF with a wildcard counts only cells that contain text characters. ISTEXT paired with SUMPRODUCT gives you a bulletproof count that ignores numbers, dates, and stray formulas. Each approach has trade-offs in speed, accuracy, and how it handles edge cases like spaces, apostrophes, and numbers stored as text, all of which we cover in detail below.

We will also address the subtle traps that catch even experienced users. An empty string returned by a formula such as =IF(A1="","",A1) looks blank but is counted by some functions and ignored by others. Numbers formatted as text, leading apostrophes, and trailing spaces all change your results. By the end you will know exactly which formula to reach for, why it works, and how to verify your answer so you never second-guess a total again, even on a messy dataset with thousands of rows.

If you want to go deeper into using formulas for real reporting after mastering text counts, our walkthrough on how do i count cells with text in excel shows how counting and aggregation feed directly into finance models, dashboards, and summary tables. For now, let us start with the foundations and build up to the advanced techniques, complete with copy-ready formulas you can paste into your own workbook and adapt to your specific columns and data layout today.

Counting Text in Excel by the Numbers

๐Ÿ“Š3Core FunctionsCOUNTA, COUNTIF, SUMPRODUCT
โœ…COUNTIF "*"Most-Used FormulaCounts all text cells
โฑ๏ธ<10 secSetup TimePer single-column count
๐ŸŒ2Wildcard CharactersAsterisk and question mark
๐Ÿ›ก๏ธ100%Accuracy With ISTEXTIgnores numbers and dates
How Do I Count Cells with Text in Excel - Microsoft Excel certification study resource

The Three Main Ways to Count Text Cells

๐Ÿ“‹COUNTA Function

Counts every non-empty cell in a range regardless of whether it holds text, numbers, dates, or errors. Fastest method when your column contains only text and you simply need a total of filled cells.

โœ…COUNTIF With Wildcard

Uses =COUNTIF(range,"*") where the asterisk matches any text characters. This counts only cells containing text and ignores pure numbers, making it the go-to choice for mixed columns of data.

๐ŸŽฏSUMPRODUCT With ISTEXT

Combines SUMPRODUCT and ISTEXT for a bulletproof count that returns the exact number of text cells, ignoring numbers, dates, blanks, and formula-driven empty strings in one elegant formula.

๐Ÿ”„COUNTIFS For Conditions

Extends COUNTIF to multiple criteria, letting you count text cells that also meet other rules, such as text in one column where a date in another column falls within a chosen range.

The single most popular answer to how can i count cells with text in Excel is the COUNTIF function paired with a wildcard. The formula =COUNTIF(A2:A100,"*") reads as "count every cell in the range A2 through A100 that contains at least one text character." The asterisk is a wildcard that stands in for any sequence of characters, including a single letter or a long sentence. Because pure numbers are not text, COUNTIF with this pattern skips them automatically, which is exactly what most people want when a column mixes labels and figures.

Excel recognizes two wildcard characters. The asterisk matches any number of characters, while the question mark matches exactly one character in a specific position. So =COUNTIF(A2:A100,"???") counts only text entries that are precisely three characters long, such as "cat" or "dog," while =COUNTIF(A2:A100,"a*") counts text entries that begin with the letter a. Combining wildcards unlocks surprisingly precise counts. For example, =COUNTIF(A2:A100,"*report*") tallies every cell whose text contains the word report anywhere inside it, regardless of the surrounding words.

It is important to understand what COUNTIF with "*" does not count. It ignores genuinely empty cells, it ignores numbers stored as actual numbers, and it ignores dates because Excel stores dates as serial numbers behind their formatting. However, it will count a number that has been stored as text, such as an account code with a leading apostrophe like '00425, because Excel sees that entry as text characters rather than a numeric value. This behavior is usually helpful but can surprise you if your data contains text-formatted numbers you did not expect.

A frequent point of confusion is the formula-returned empty string. Suppose column B contains =IF(A2="","",A2) copied down hundreds of rows. The cells that resolve to "" look blank, yet =COUNTIF(B2:B100,"*") counts them as text because an empty string still qualifies as text under the wildcard rule. If you need to exclude those, you must switch to a SUMPRODUCT and LEN approach, which we cover later, or add a second criterion that requires a minimum length so the truly empty results are filtered out cleanly.

For whole-column counting, you can reference an entire column like =COUNTIF(A:A,"*") and Excel will scan from row one to the bottom. This is convenient because you do not have to adjust the range when new rows are added, but it can be marginally slower on very large files and it will count any stray text in header rows. Many analysts prefer a defined range or an Excel Table reference such as =COUNTIF(Table1[Status],"*") because tables expand automatically and keep your formulas readable and self-documenting for anyone who opens the file later.

Once you are comfortable counting text, the natural next skill is looking values up, and many readers pair this technique with vlookup excel knowledge to both count and retrieve matching records. Counting tells you how many text entries exist; a lookup tells you what is in a specific matching row. Together they form the backbone of most reporting tasks, from inventory summaries to attendance sheets. The wildcard you learned here even works inside VLOOKUP and MATCH, so the partial-match concept carries over directly to those lookup functions you will use next.

FREE Excel Basic and Advance Questions and Answers

Practice core Excel skills from basic formulas to advanced functions with instant feedback on every answer.

FREE Excel Formulas Questions and Answers

Sharpen your formula skills including COUNTIF, COUNTA, and SUMPRODUCT with realistic spreadsheet scenarios.

COUNTA vs COUNTIF vs SUMPRODUCT for Counting Text

COUNTA is the simplest counter in Excel. The formula =COUNTA(A2:A100) returns the number of cells in that range that are not empty. It counts text, numbers, dates, logical values, and even error results, so it is perfect when your column holds only text labels and you just want a quick total of how many entries exist without worrying about data types or tricky edge cases.

The catch is that COUNTA cannot distinguish text from numbers. If column A mixes the word "approved" with the number 2026, COUNTA counts both. It also counts formula cells that return an empty string, because those cells technically contain a formula and are therefore not truly empty. Use COUNTA when speed matters and you already know the column is text-only, and reach for COUNTIF or SUMPRODUCT the moment data types are mixed together.

Microsoft Excel - Microsoft Excel certification study resource

Should You Use COUNTIF or SUMPRODUCT to Count Text?

โœ…Pros
  • +COUNTIF with "*" is short, fast, and easy for beginners to remember
  • +Wildcards allow flexible partial matching like contains, starts with, ends with
  • +COUNTIF automatically ignores pure numbers and date serial values
  • +Works on whole columns and Excel Tables that expand automatically
  • +SUMPRODUCT with ISTEXT gives the most accurate, type-safe text count
  • +SUMPRODUCT extends cleanly to multiple conditions in one formula
โŒCons
  • โˆ’COUNTIF counts formula-returned empty strings as text by default
  • โˆ’COUNTIF can mistakenly count numbers that were stored as text
  • โˆ’Wildcard syntax differs from regular expressions and confuses new users
  • โˆ’SUMPRODUCT is harder for beginners to read and explain to others
  • โˆ’SUMPRODUCT runs slightly slower on very large multi-thousand-row ranges
  • โˆ’Both require knowing your data types to choose the right approach

FREE Excel Functions Questions and Answers

Master Excel functions including COUNTA, ISTEXT, and SUMPRODUCT through hands-on practice questions with clear explanations.

FREE Excel MCQ Questions and Answers

Multiple-choice Excel questions covering counting, lookups, formatting, and data validation for exam-style practice.

Checklist to Count Cells With Text in Excel Correctly

  • โœ“Confirm whether your column holds only text or a mix of text and numbers
  • โœ“Select the exact range or convert it to an Excel Table for auto-expansion
  • โœ“Use =COUNTA(range) for a quick count when the column is text-only
  • โœ“Use =COUNTIF(range,"*") to count only text cells in a mixed column
  • โœ“Use =SUMPRODUCT(--ISTEXT(range)) when you need to ignore formula blanks
  • โœ“Check for numbers stored as text with a leading apostrophe before trusting totals
  • โœ“Watch for trailing spaces that make cells look empty but still count
  • โœ“Exclude header rows from your range to avoid an off-by-one error
  • โœ“Add a LEN check to skip empty strings returned by IF formulas
  • โœ“Verify your result against a manual filter to confirm the count is right

=COUNTIF(A:A,"*") counts every text cell in column A

If you remember only one formula for counting text, make it =COUNTIF(range,"*"). The asterisk matches any text characters and automatically skips pure numbers and dates. For airtight accuracy that also ignores formula-returned empty strings, upgrade to =SUMPRODUCT(--ISTEXT(range)) and you will never miscount again.

Even the right formula can return the wrong number if you overlook a few common traps. The most frequent mistake is including header rows in your range. If you write =COUNTIF(A1:A100,"*") and row one holds the column title "Status," Excel counts that header as a text cell, inflating your total by one. Always start your range below the header, for example A2:A100, or reference an Excel Table column that excludes headers by design. This single habit prevents the most common off-by-one error in counting text.

The second trap is the invisible empty string. A cell that contains =IF(A2="","","yes") returns "" when the condition is false, and that empty string is still text. So =COUNTIF(B2:B100,"*") counts it, even though the cell looks blank. To exclude these, use =SUMPRODUCT(--(LEN(B2:B100)>0)) which counts only cells with at least one visible character, or =SUMPRODUCT(--ISTEXT(B2:B100),--(LEN(B2:B100)>0)) to require both text type and non-zero length together for a truly clean count.

Trailing and leading spaces cause a third class of errors. A cell holding a single space character " " is not empty and will be counted by COUNTIF "*" and COUNTA alike, even though it appears blank on screen. These stray spaces often arrive when data is copied from web pages or other applications. Use the TRIM function to clean them first, or test with =SUMPRODUCT(--(TRIM(A2:A100)<>"")) to count only cells that contain something other than whitespace once spaces are stripped away during evaluation.

Numbers stored as text create a fourth surprise. When you import data, account numbers, ZIP codes, and product SKUs frequently arrive as text rather than numbers, often marked by a small green triangle in the cell corner or a leading apostrophe. COUNTIF with "*" counts these as text because that is exactly what they are, which may or may not match your intent. If you want to exclude them, you can combine ISTEXT with ISNUMBER checks, but most often counting them as text is the correct and expected behavior.

A fifth issue is case sensitivity, or rather the lack of it. COUNTIF is not case sensitive, so =COUNTIF(A2:A100,"yes") counts "Yes," "YES," and "yes" identically. This is usually convenient, but if you genuinely need a case-sensitive count, you must use SUMPRODUCT with the EXACT function, such as =SUMPRODUCT(--EXACT(A2:A100,"Yes")). This counts only cells matching the exact capitalization you specify, which matters in fields like passwords, codes, or any data where letter case carries real meaning for your analysis.

Finally, watch out for entire-column references slowing large workbooks and for merged cells breaking your counts. Merged cells store their value only in the top-left cell, so a count may come up short when ranges include merges. Unmerge before counting, or restructure with center-across-selection formatting instead. After mastering these edge cases you will want to protect your work, and our guide to locking formulas keeps your carefully built counters from being overwritten by accidental edits from other users sharing the file.

Excel Spreadsheet - Microsoft Excel certification study resource

Once you can count text cells, the next level is conditional counting, where you count text only when other rules are satisfied. The COUNTIFS function extends COUNTIF to multiple criteria evaluated together. For example, =COUNTIFS(A2:A100,"*",B2:B100,">100") counts rows where column A contains any text and column B holds a value greater than 100. Each criterion pair narrows the result, letting you answer questions like "how many labeled orders exceeded the threshold" without building a helper column or filtering the data manually first.

When your conditions span ranges in ways COUNTIFS cannot express, SUMPRODUCT becomes the flexible workhorse. Consider counting text cells in column A only where the matching date in column C falls in 2026. You could write =SUMPRODUCT(--ISTEXT(A2:A100),--(YEAR(C2:C100)=2026)). SUMPRODUCT multiplies the two arrays of ones and zeros element by element, so a row counts only when both conditions are TRUE. This pattern scales to three, four, or more conditions, each added as another --(condition) factor inside the same formula expression cleanly.

You can also count distinct text values, which is a more advanced need. To count unique text entries in a range, one classic formula is =SUMPRODUCT(1/COUNTIF(A2:A100,A2:A100)) for ranges with no blanks, which divides each occurrence by its own frequency so duplicates sum to one. In modern Excel, =COUNTA(UNIQUE(A2:A100)) is far cleaner, returning the count of distinct text values directly. The UNIQUE function spills a list of unique entries that COUNTA then totals, giving you a fast, readable distinct count for any text column.

Counting by partial match across conditions is another powerful combination. Suppose you want to count cells containing the word "urgent" only in rows assigned to a specific team. =COUNTIFS(A2:A100,"*urgent*",B2:B100,"Team A") handles this elegantly, blending the wildcard partial match from earlier with an exact-match second criterion. This kind of layered counting turns a raw list into instant insight, replacing tedious manual review with a single formula that updates automatically whenever the underlying data changes or new rows arrive.

For dashboards, you will often want these counts to react to a dropdown selection. Pair your COUNTIFS with a data validation list so a user can pick a category and watch the count update. If you have not built one before, learning how to create a drop down list in excel takes only a minute and transforms a static report into an interactive tool. The selected value feeds directly into your COUNTIFS criterion, so the count reflects whatever the user chooses from the list every time.

Finally, remember that counting is frequently the first step in a larger model. Counts feed percentages, ratios, and weighted summaries that drive decisions. Our deeper resource on financial functions connects these counting techniques to functions like PMT, NPV, and IRR, showing how a humble text count can anchor a complete loan model or budget dashboard. Mastering the count is the foundation; everything else in your analysis builds on getting that first number exactly right, verified, and reliable before you move on.

With the core techniques in hand, a few practical habits will make your text counting faster and more reliable in everyday work. First, convert your data to an Excel Table by pressing Ctrl+T before you write any counting formulas. Tables give your ranges meaningful names like Table1[Status], expand automatically when you add rows, and make formulas self-explanatory to anyone who opens the file. This one step eliminates most off-by-one and stale-range errors before they ever happen, and it keeps your workbook tidy as it grows.

Second, always clean your data before counting. Run TRIM to strip stray spaces, use Find and Replace to remove non-breaking spaces that arrive from web copies, and use Text to Columns or the VALUE function to convert numbers stored as text when you truly want them treated as numbers. A five-minute cleanup at the start saves hours of confusion later when your counts mysteriously fail to match a colleague's manual tally of the very same dataset.

Third, verify every important count two ways. Build your formula, then apply a filter to the column and check the row count shown in the status bar at the bottom of the screen. If the two numbers disagree, you have uncovered a hidden empty string, a trailing space, or a header row sneaking into your range. This habit of cross-checking turns counting from a source of anxiety into a quick, confident step you can trust when the stakes are high.

Fourth, document your formulas with a brief note in an adjacent cell or a comment. Six months from now, you may not remember why you chose SUMPRODUCT with ISTEXT over a simple COUNTA. A short note like "counts text only, ignores formula blanks" preserves your reasoning and helps teammates maintain the file. Clear documentation is what separates a one-off spreadsheet from a durable tool that an entire team can rely on without breaking it accidentally over time.

Fifth, learn the keyboard and navigation tricks that speed up working with large lists. Knowing how to freeze a row in excel keeps your headers visible as you scroll through thousands of entries, so you always know which column you are counting. Freezing panes, using Ctrl+Arrow to jump to the edge of data, and naming ranges all reduce the friction of working with big datasets and lower the chance of selecting the wrong range for your count.

Sixth, when you share a finished workbook, protect the cells that hold your counting formulas so collaborators cannot overwrite them by accident. A single stray keystroke in the wrong cell can replace a careful formula with a typed number that never updates again. Locking formula cells while leaving data-entry cells open preserves the integrity of your counts. Combined with clean data and verified formulas, these habits make your text-counting work professional, repeatable, and dependable across every report you produce.

Finally, keep practicing with realistic scenarios. The fastest way to internalize when to use COUNTA, COUNTIF, or SUMPRODUCT is to solve real problems repeatedly until the choice becomes automatic. Build a small practice file with mixed text, numbers, dates, blanks, and formula-driven empty strings, then count each type deliberately. Watching how each function responds to the same messy data cements your understanding far better than reading alone, and it prepares you for the surprises that real-world spreadsheets inevitably throw at you.

FREE Excel Questions and Answers

Full Excel certification-style practice test covering counting, lookups, formatting, and data analysis skills.

FREE Excel Trivia Questions and Answers

Fun, fast Excel trivia to test your knowledge of functions, shortcuts, and spreadsheet features.

Excel Questions and Answers

About the Author

Katherine LeeMBA, CPA, PHR, PMP

Business Consultant & Professional Certification Advisor

Wharton School, University of Pennsylvania

Katherine Lee earned her MBA from the Wharton School at the University of Pennsylvania and holds CPA, PHR, and PMP certifications. With a background spanning corporate finance, human resources, and project management, she has coached professionals preparing for CPA, CMA, PHR/SPHR, PMP, and financial services licensing exams.