Quantcast
Channel: Hot Weekly Questions - Web Applications Stack Exchange
Viewing all articles
Browse latest Browse all 9782

How to Count Combinations In a Set (Including dupes)

$
0
0

Trying to figure out a formula where I have 5 columns of text data. I want to count how many times combinations of data in 2 contiguous columns appear in each row.

Example data:

ABCDE
1AAABC
2ABBAA

In the example data above there are 8 range pairs (4 ranges per row):

Paired Cells 1Paired Cells 2Paired Cells 3Paired Cells 4
Row 1{A1:B1}{B1:C1}{C1:D1}{D1:E1}
Row 2{A2:B2}{B2:C2}{C2:D2}{D2:E2}

From the paired ranges there are eight unique value pairs:

Unique Paired ValuesCountPaired Cell Locations
{A,A}3A1:B1 B1:C1 D2:E2
{A,B}2C1:D1 A2:B2
{B,C}1D1:C1
{B,B}1B2:C2
{B,A}1C2:D2
           &nbspCount Total: 8Paired Cells Total: 8

Viewing all articles
Browse latest Browse all 9782

Trending Articles



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