Search code examples
excelexcel-formulaaveragepivot-tableworksheet-function

How to get average value (of column values) of a category (distributed in rows)?


I have data in Excel in the format:

Type:   Price:
A       10
A       20
D       30
A       50
D       60

How can I get average price of each category (A, D)?

To be clear: enter image description here

Data given in figure is just example for simplicity. Actually I have 13000 rows with that kind of data with 99 categories distributed in rows and given a 'Price' in second column.


Solution

  • I suggest a PivotTable.

    Based on your data sample:

    SO34192183 example