Finding number of occurances of values

  • Thread starter Thread starter JackRnl
  • Start date Start date
J

JackRnl

I have a sorted array (8 integer elements) and a large matrix (10000, 9
and would like to know how many elements of my sorted array occur i
each row of my matrix and put that count (for each row) in an intege
array Present(10000)

Must i compare each element of my sorted array with each element o
each row of my matrix (OK, I can do it "intelligent" and skip part o
the comparisons), or does a function exist that allows me to do tha
more efficient. Ideal would be for the whole matrix at once of course
 
I would do that with VBA but perhaps someone else can come up with an array
formula for you.
In VBA, you would write code to loop through each row of your 10000 rows.
Within this loop, you would have a second loop through the sorted array of
8. The inner loop would come up with the number of "hits" for each row and
place that number in the 10th column. Does that sound like something you
want? Post back if you need more. HTH Otto
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top