Solved

Can COUNTIFS be used for text within a cell?

Posted on 2013-05-16
3
407 Views
Last Modified: 2013-05-16
I want to be able to put a word in B1
and have countifs formula in C1 that will tell me how many times
the word in B1 appeared in the list A2:A9.

Screenshot of spreadsheetFruit.xlsx
0
Comment
Question by:Alex972
3 Comments
 
LVL 85

Accepted Solution

by:
Rory Archibald earned 500 total points
ID: 39171258
=COUNTIF(A2:A9,"*"&B1&"*")
should do it.
0
 
LVL 92

Expert Comment

by:Patrick Matthews
ID: 39171680
If you are trying to count the number of cells containing the text in B1, Rory's formula will work perfectly.  If you are counting the actual number of instances of that text (for example, counting "apple" twice if that word happens to appear twice in one of the cells), you need something a little more complex:

{=SUM(LEN(A2:A9)-LEN(SUBSTITUTE(A2:A9,B1,"")))/LEN(B1)}

That's an array formula, so enter it without the curly braces, and use Ctrl+Shift+Enter instead of just Enter to finish it off.  Excel will then display the formula with the braces.
0
 

Author Closing Comment

by:Alex972
ID: 39171729
Great, thanks, very impressive
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

This article will show you how to use shortcut menus in the Access run-time environment.
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
The viewer will learn how to create a normally distributed random variable in Excel, use a normal distribution to simulate the return on an investment over a period of years, Create a Monte Carlo simulation using a normal random variable, and calcul…
This Micro Tutorial demonstrate the bugs in Microsoft Excel for Mac with Pivot Charts.

747 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now