How to Count Specific Words in a Column in Excel – 2 Methods

In the sample dataset, count “happy” and “life” in C5:C10.

2 Methods to Count Specific Words in Column in Excel


Method 1 – Combine Functions to Count Specific Words in a Column

Steps:

  • Select D15 and enter the following formula.

=SUMPRODUCT(LEN(C5:C10)-LEN(SUBSTITUTE(C5:C10,$C$12,"")))/LEN($C$12)+SUMPRODUCT(LEN(C5:C10)-LEN(SUBSTITUTE(C5:C10,$C$13,"")))/LEN($C$13)

Combine SUMPRODUCT, LEN, and SUBSTITUTE Functions to Count Specific Words in a Column in Excel

  • Press Enter button.

This is the output.

Excel Count Specific Words in Column

Formula Breakdown

  • There are two parts in the formula: for word 1 and word 2.
  • LEN(C5:C10)
    • Output: {63;58;74;104;44;114}.
    • returns the string lengths.
  • LEN(SUBSTITUTE(C5:C10,$C$12,””))
    • Output: {58;58;74;104;34;114}.
    • The SUBSTITUTE function replaces “happy” in the cell range. The LEN function returns its length in an array.
  • LEN($C$12)
    • Output: 5.
    • returns the length of word 1.
  • The first part reduces to -> SUMPRODUCT({5;0;0;0;10;0})/5
    • Output: 3.
    • counts the number of “happy” in the column. 5+10=15, then 15/5=3.
  • The second part reduces to -> SUMPRODUCT({4;0;8;0;0;0})/4
    • Output: 3.
  • returns 3+3=6.

 


Method 2 – Count Specific Words in a Column Ignoring Cases

Steps:

  • Enter the following formula in D15.

=SUMPRODUCT(LEN(C5:C10)-LEN(SUBSTITUTE(UPPER(C5:C10),UPPER($C$12),"")))/LEN($C$12)+SUMPRODUCT(LEN(C5:C10)-LEN(SUBSTITUTE(UPPER(C5:C10),UPPER($C$13),"")))/LEN($C$13)

Count Specific Words in Column Ignoring Case

  • Press Enter.

 


How to Count How Many Times A Word Appears in A Cell in Excel

Another dataset will be used.

Steps:

  • Enter the following formula in D5.

=(LEN(B5:B10)-LEN(SUBSTITUTE(B5:B10,$C$12,"")))/LEN($C$12)

How to Count How Many Times A Word Appears in A Cell in Excel

  • Press Enter.

 


Things to Remember

  • Don’t leave any space inside the double quotation marks.
  • Keep the word to be counted inside double quotation marks.

Download the Practice Workbook

Download the Excel file.


<< Go Back to Count Words | Learn Excel

Get FREE Advanced Excel Exercises with Solutions!
Mrinmoy Roy
Mrinmoy Roy

Mrinmoy Roy, a dedicated professional with a BSc in Electronics and Communication Engineering from Khulna University of Engineering & Technology, Bangladesh, brings over two years of expertise to the ExcelDemy project. As a prolific contributor, he has authored around 180 articles, showcasing his deep knowledge and passion for Microsoft Excel, Data Analysis, and VBA. His unwavering commitment to continuous learning, combined with versatile skills, renders him well-suited for roles in data management and spreadsheet solutions. He has interest... Read Full Bio

We will be happy to hear your thoughts

Leave a reply

Advanced Excel Exercises with Solutions PDF

 

 

ExcelDemy
Logo