Your league rules will vary of course, but our league will take the average of the last 7 non-zero rounds minus the lowest and highest scores. Players miss weeks during the season so they can have zero scores.

Week 1 | Week 2 | Week 3 | Week 4 | Week 5 | Week 6 | Week 7 | Week 8 | Week 9 | |

Bob | 38 | 42 | 0 | 0 | 39 | 41 | 37 | 38 | 41 |

Bob's average is thus 39.4, taking the 276 stroke total and subtracting the high of 42 and the low of 37.

For less than 6 rounds we just take the average of all non-zero, and for 6 rounds we'll subtract the highest and not the lowest to get our five rounds.

So I would expect the LAMBDA to be recursive, counting backward until it hits either 7 non-zero scores or the golfer name AND figuring the min and max along the way (excluding zero scores of course), then subtracting the appropriate number of scores and taking the average of what's left.

What has me boggled is trying to track the 3 variables during the recursive search...