If I were to write
=COUNTIF(A1:A100,"*123*")
It would only count if cells A1 to A100 contained 123
But if 123 was stored in cell B1 how would I write it ?
for example
=COUNTIF(A1:A100,*B1*)
but I know this doesnt work
If I were to write
=COUNTIF(A1:A100,"*123*")
It would only count if cells A1 to A100 contained 123
But if 123 was stored in cell B1 how would I write it ?
for example
=COUNTIF(A1:A100,*B1*)
but I know this doesnt work
Try this
=COUNTIF(A1:A100,"*"&B1&"*")
If you like my answer please click on * Add Reputation
Don't forget to mark threads as "Solved" if your problem has been resolved
"Nothing is so firmly believed as what we least know."
--Michel de Montaigne
Hi,
=COUNTIF(A1:A100,"*"&B1&"*")
will work.
Incidentally with your original you wouldn't pick up a value which was a numeric 123. You'd need
=COUNTIF(A1:A100,"*123")+COUNTIF(A1:A100,123)
Richard Buttrey
RIP - d. 06/10/2022
If any of the responses have helped then please consider rating them by clicking the small star icon below the post.
Try this: =countif(A1:A100, "*" & B1 & "*")
Alan עַם יִשְׂרָאֵל חַי
Change an Ugly Report with Power Query
Database Normalization
Complete Guide to Power Query
Man's Mind Stretched to New Dimensions Never Returns to Its Original Form
just
=COUNTIF(A1:A100,"*"&B1&"*")
"Unless otherwise stated all my comments are directed at OP"
Mojito connoisseur and now happily retired
where does code go ?
look here
how to insert code
how to enter array formula
why use -- in sumproduct
recommended reading
wiki Mojito
how to say no convincingly
most important thing you need
Martin Wilson: SPV
and RSMBC
perfect
Thanks x
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks