# Counting number of times a value appears if..

[Solved/Closed]
-
Posts
1
Registration date
Thursday April 21, 2016
Status
Member
Last seen
April 21, 2016
-
Hello,

I conducted a survey in which some questions allowed more than one response.

Using Excel - I'm trying to count the number of times a certain value appears in a column even if there are multiple values in the same cell.

For example: A respondant may have selected answer a, b, d for question 5 (all 3 of these would be in the same cell), while another respondant may have selected answer a, c, d for the same question. For that entire column, I want to know how many times respondants selected "a" regardless of any other selections made.
COUNTIF only counts this response in that column if "a" was the only option selected.

Thanks
Related:

## 3 replies

Posts
190
Registration date
Sunday April 12, 2009
Status
Member
Last seen
February 16, 2010
155
Suppose your data is in Column A then paste this formula anywhere or in A12 and Press Ctr+Shift+Enter as this is any Array formula ....... After pressing Ctr+Shift+Enter to enter the formula you will see {} will occur around the formula ={SUM(IF(ISERROR(SEARCH("*a*",A1:A10,1)),0,1))} ... never try to enter {} manually ....

Array Formula : After entering the formula Press Ctrl+Shift+Enter
`=SUM(IF(ISERROR(SEARCH("*a*",A1:A10,1)),0,1))`

The array formula works, but it takes too much computer power to calculate and will make the workbook larger in size. Use the COUNTIF formula with the conjunction of the wild card ("*").

IF CELL B1, contains the following values: a, b, c, d, e, f, g
and cell B2, contains the following values: a, b, c, d, e, f, g

You want to know how many times the value "a" shows up in column B across all the cells. The formula to use would be:

=COUNTIF(\$B:\$B,"*"&"a"&"*")

the formula should return quantity of 2, since a is showes up in cell B1 and B2.
this works perfectly!
How do you do it with a cell reference instead of a value. i.e A10 instead of "a"?
Posts
4476
Registration date
Thursday January 28, 2010
Status
Contributor
Last seen
August 2, 2020
768
Mr Excel: Like this
=COUNTIF(\$B:\$B,"*"&A10 &"*")
Posts
1
Registration date
Thursday April 21, 2016
Status
Member
Last seen
April 21, 2016

Hi, if I have a column of values from an open question on a survey, how can I see:
- what words were said
- how many times each word were said

For instance, a participant may say that they like a TV because it is: cool, smart, useful.
doesnt work for me. says thers none of the data im looking for in the cells im searching when there clearly is