I have a workbook that contains a column with a long list of randomly ordered numeric department codes (column M), and a separate column (column J) with numeric values. I need an average for the numeric values in column J according to each department code and then each linked to sheet 2. Any help would be greatly appreciated.

Thank you!