# How to count number of unique combinations inside a table of data?

• What I want to do is count the number of times that the combinations below appear in each row in the table of data. I've been looking all over the internet to for tutorials and tips but none have been helpful to me.

I've attached the Excel file that I'm currently using.

Here is a sample of the data I'll be using:

This is the table of data:

[TABLE="width: 64"]

[tr]

[TD="width: 64"]123489[/TD]

[/tr]

[tr]

[td]

126475

[/td]

[/tr]

[tr]

[td]

135678

[/td]

[/tr]

[tr]

[td]

134589

[/td]

[/tr]

[tr]

[td]

126789

[/td]

[/tr]

[tr]

[td]

345679

[/td]

[/tr]

[/TABLE]

Here is a sample list of combinations:

[TABLE="width: 64"]

[tr]

[TD="width: 64"]123[/TD]

[/tr]

[tr]

[td]

124

[/td]

[/tr]

[tr]

[td]

125

[/td]

[/tr]

[tr]

[td]

126

[/td]

[/tr]

[tr]

[td]

127

[/td]

[/tr]

[tr]

[td]

128

[/td]

[/tr]

[tr]

[td]

129

[/td]

[/tr]

[/TABLE]
[TABLE="width: 192"]

[tr]

[/tr]

[tr]

[/tr]

[tr]

[TD="align: right"][/TD]

[/tr]

[/TABLE]
The final result should be that combination 123 appears once and combination 126 appears twice, while the other combinations don't appear at all or 0 times.

Feel free to ask any questions if this seems confusing.

## Files

• Re: How to count number of unique combinations inside a table of data?

Are you always evaluating the sample against the first 3 digits? Or if that combination of three digits appeared anywhere in the string would it still count?

i.e. if evaluating 123 and the number was 181237 then would it still count due to 123 being digits 3, 4, & 5?

• Re: How to count number of unique combinations inside a table of data?

I think I get it... Added some helper columns.

## Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!