0

For this formula:

=COUNTIF(A1:A10,"jim") 

how can I pass in a variable? That is, let's say that cell C11 has the value "jim"; can I then do something like:

=COUNTIF(A1:A10,TEXT_VALUE_OF_CELL(C11)) 

for the same result?

3
  • 1
    I'm very curious as to why this question received 2 no-comment downvotes. It may not look like a very good question to anyone familiar with Excel, but I don't see how it's not a perfectly acceptable Question.
    – Alex M
    Commented Mar 12, 2019 at 18:47
  • why, thank you, @AlexM. The more complex question is how to use wildcards, such as something like: "*C11" with COUNTIF, or other pattern matching.
    – Thufir
    Commented Mar 14, 2019 at 3:21
  • Sure, that could also be an interesting question, many (many) variants of which likely exist on this stack.
    – Alex M
    Commented Mar 14, 2019 at 16:36

1 Answer 1

5

The cell reference acts as a variable: =COUNTIF(A1:A10,C11)

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .