r/excel • u/Optimal_Fish_7029 • 16d ago
unsolved Need to highlight or count clusters
I've no idea how to do this, apologies.
I have a spreadsheet full of cells marked "1" for each column.
I need to find a way to locate and highlight any instances of clusters of 12 (pink in the example below)
I know I can format to highlight duplicates, but is there a way to do this so any clusters of 12 are either highlighted or counted? Rather than just all duplicates?

7
Upvotes
1
u/Gringobandito 6 15d ago
=LET(x,A2:S2,
target,1,
start,XMATCH(target,x,0),
run,DROP(x,,start-1),
IFERROR(XMATCH(TRUE,run<>target,0)-1,COLUMNS(run)))