Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
Solved

Can COUNTIFS be used for text within a cell?

Posted on 2013-05-16
Medium Priority
424 Views
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.

Fruit.xlsx
0
Question by:Alex Campbell
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

• Help others & share knowledge
• Earn cash & points

LVL 85

Accepted Solution

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

LVL 93

Expert Comment

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

LVL 1

Author Closing Comment

ID: 39171729
Great, thanks, very impressive
0

Featured Post

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

My attempt to use PowerShell and other great resources found online to simplify the deployment of Office 365 ProPlus client components to any workstation that needs it, regardless of existing Office components that may be needing attention.
If you need to forecast numbers -- typically for finance -- the Windows and Mac versions of Excel 2016 have a basket of tools to get the job done.
This Micro Tutorial will demonstrate how to use a scrolling table in Microsoft Excel using the INDEX function.
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as formâ€¦
Suggested Courses
Course of the Month7 days, 3 hours left to enroll