Count how many times an item appear in a text list (not ref list)

What happen if [Pattern] is post fix of a longer string?

Example “Something Pattern,Pattern”

Another thing is “Pattern” could be end of the list.

It’s doable but without native support but the solution will be convoluted.

Fixed by appending the delimiter to the end of the [ColumnToSearch].

I am unsure what you mean. Like if list is:
Cat, Cat, Dog, Mouse
Search and Count:
Cat, Dog

In my example, I use a drop down of the list to help you pick what item you want to count to eliminate what I think you’re talking about.

So in my sample app ^, I set up a column as an EnumList - just for easy adding/editing the list.
Another column that uses the list for valid if values to select a pattern, so that you can only count full items in the list - so no partial or fuzzy counting.
A VC to reformat that list into a Text string to work with.
And another VC with a slight change but otherwise the same formula originally posted by @GreenFlux, targeting the VC with the reformatted list.

Works for 1st item, last item, pen vs pencil, several sequential of the pattern, mixes of spaces, and anything else I could think of.

1 Like

Seems like your solution could work for cases I can think of.

Not sure why you have to substitute space with underscore?

It doesn’t have to be an underscore, per se. But in order for extract to pull a mention correctly, each “item” in the list can’t have spaces in it. So you could just remove it a different way like SUB([List], [Pattern], “@howdoyoudogoodsir”) and skip my more complicated sub. But you know, ideas.