How to retrieve all occurences of a particular value within a string?

Posted by Everyone on Super User See other posts from Super User or by Everyone
Published on 2012-04-05T05:09:50Z Indexed on 2012/04/05 5:33 UTC
Read the original article Hit count: 401

Filed under:

I'm looking at an excel work-book with potential definitions for a column(upto 135) referenced from an adjacent sheet.

E.g. Sheet 1: Col C (values 0-134 defined in Sheet 2 )

Each row in Col C Sheet 1 may have any combination of the values separated by commas.

E.g. 0,1,8

Sheet 2 must maintain statistics of the occurence of each value. This is done using COUNTIF. The issue here is that COUNTIF doesn't handle an embedded value too well. When so done, the reference to '1' in the above example won't appear.

How can this be done without resorting to a sub-routine?

© Super User or respective owner

Related posts about microsoft-excel