Google sheets, have Fantasy Football player scores in rows for each of 38 gameweeks over the year.
As another measure of skill, want to know how many times a player has been last or first placed in each of the gameweeks. This is shown below where red is last and green is first placed:
CodePudding user response:
You can use this formula:
=BYROW(MAP(B1:Z5,LAMBDA(a,IF(a="",0,IF(a=MIN(INDEX(B1:Z5,,COLUMN(a)-1)),1,0)))),LAMBDA(b,SUM(b)))
Change B1:Z5 with your actual range both times it appears. And the -1 next to COLUMN(a) with -2 if it starts IN C column, -3 if it starts in D column and so on
Repeat the same formula changing MIN with MAX for counting maximums