I need a formula to count the number of matches between two ranges even some numbers repeat itself. For example, if in row1 ( 1,1,1,3,3,4,2,8) and row2(1,2,3,4,5,5,7,7). Here there are 4 unique numbers match (1,2,3,4). But with repeating numbers, it is actually 7 numbers (1,1,1,3,3,2,4). I need a formula to count the latter method. I'd be glad if someone can suggest me a formula for this. Thanks!