Here is one way. I created a "duplicated range" that only counted when a value was duplicated along the row regardless of the number of identical items that were in a row.
Formula:![]()
=IF(AND(B2>0,B2=C2,COUNTIF($B$2:B2,B2)=1),1,"")
Then sum the 1s created by that duplicated range:
Formula:![]()
=SUM(O2:X2)
This is how it came together on a worksheet
There is probably a better way of doing this.
Bookmarks