I'm having trouble explaining exactly what I need, it'll be easier if I just give an example. Please keep in mind I'm not a programmer of any sorts, I'm just working on getting together some statistic data for my job.
Column 1 Column 2
1 D
2 A
3 D
4 D
5 A
What I need is to calculate an average between the numbers belonging to column 1 that correspond to cells belong to column 2 which have the value "D". I imagine the easiest way would be to just sort the whole table alphabetically around column 2, but I'm not allowed to make any changes to the table. I hope I got my point across clearly enough, thank you in advance!