I'm trying to create a formula to calculate average golf scores.

Sounds easy enough but I only want to take the average of the lowest 8 scores.

I have managed to combine RANK, IF and AVERAGE to some degree but I am still having problems where I have duplicate scores.

Any ideas?