1
1
2
1
1
2
2
3
2
1

Hi, so I would like to count how often pairs of (1,1) and (1,2), and (2,1) occur in this range. Results should be 2 for all three pairs. Please note that I would also like to skip the exclusion of a pair due to other numbers crossing in between such as 3 in this case of (1,3,1) which should still be counted as 1 pair of (1,1). Also I would also like to be able to count more than 2 consecutive pairs, for example (1,1,1) or (1,1,2) or (2,2,1) and so on: the more the better! Please let me know how I can achieve this using just formulas and no VBA.