Please see attached sample.
Note: Column A and B will be going down to 2000 rows, and so formula in Col D will need to go down to 4000+ with a simple copy and paste down.
This does not seem to work:
=LET(a,SUM(IF(MOD(ROWS(E$2:E2),5)={0,3},2,1))-1,INDEX(($A$2:$A$7,$B$2:$B$5),+SUM(IF(a=1,COUNTIF(E$1:E1,$A$2:$A$7),COUNTIF(E$1:E1,$B$2:$B$5))),,a))
Bookmarks