This is rather cumbersome. I couldn't find a way to do the same dynamic range with OFFSET. It would be more compact.
Array entered in L2 and filled down in your last upload. If you aren’t familiar with array-entered formulas array enter means the formula must be committed from edit mode by simultaneously pressing and holding down Ctrl and Shift while hitting Enter.
=SUM((INDEX($C$2:$H$144,MATCH(1,1/(K2=$A$2:$A$144),0),):INDEX($C$2:$H$144,MATCH(2,1/(K2=$A$2:$A$144),1),)<>"")/COUNTIF(INDEX($C$2:$H$144,MATCH(1,1/(K2=$A$2:$A$144),0),):INDEX($C$2:$H$144,MATCH(2,1/(K2=$A$2:$A$144),1),),INDEX($C$2:$H$144,MATCH(1,1/(K2=$A$2:$A$144),0),):INDEX($C$2:$H$144,MATCH(2,1/(K2=$A$2:$A$144),1),)&""))
Bookmarks