Quantcast
Channel: Active questions tagged excel - Stack Overflow
Viewing all articles
Browse latest Browse all 88066

count matches based on list of values in a cell

$
0
0

This seems like it should be simple but after googling for hours and trying many different approaches I'm stumped.

I have a table of values containing single and two digit numbers, and a cell containing the list of values to be counted. This list of values is separated by spaces and can be any length.

The first version of this I did worked fine because I was only using single digit numbers in the table. This is the formula I used: =countIf(arrayFormula(regexMatch(<table>, substitute(<cell>, "", "|"))), TRUE)

So in my list cell I can put 2 4 6 and all the cells containing those numbers will be counted.

For the second version I need to able to put 3 12 and make sure values like 2 and 13 would not be counted.

I would like to avoid using VBA since I want this to work in sheets, number, excel, etc.


Viewing all articles
Browse latest Browse all 88066

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>