Further questioning on a question I asked yesterday.
    Year    CW  PIECE       n
1   2018    31  Y5 A        11
2   2018    32  Y5 A        1   
3   2018    33  Y5 A        2
4   2018    36  Y5 B        25
5   2018    37  Y5 B        5
Again I have quite a large dataset. Is there a simple way to loop through this to see -- For each unique value of "PIECE" (So for this small sample it would be average the Y5 A values to get 4.67 and Y5 B get 15) to average the values in column "n"