Solved

Can COUNTIFS be used for text within a cell?

Posted on 2013-05-16
3
422 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: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
  • Learn & ask questions
3 Comments
 
LVL 85

Accepted Solution

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

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
 
LVL 1

Author Closing Comment

by:Alex Campbell
ID: 39171729
Great, thanks, very impressive
0

Featured Post

Get MySQL database support online, now!

At Percona’s web store you can order your MySQL database support needs in minutes. No hassles, no fuss, just pick and click. Pay online with a credit card.

Question has a verified solution.

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

This article describes how you can use Custom Document Properties to store settings and other information in your workbook so that they will be available the next time you open the workbook.
Outlook for dependable use in a very small business   This article is about using the Outlook application (part of Microsoft Office) in a very small business, or for homeowners where dependability and reliability are critical requirements. This …
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

627 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