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

时间:2015-12-10 01:27:03

标签: excel excel-formula average pivot-table worksheet-function

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.

3 个答案:

答案 0 :(得分:2)

Put this in E3 and drag down till E6:

=AVERAGEIF(A$3:A$16,D3,B$3:B$16)

答案 1 :(得分:1)

I suggest a PivotTable.

Based on your data sample:

SO34192183 example

答案 2 :(得分:-2)

Here is the formula for averaging in excel. Just change and/or add cells as desired and enter it all into the cell you want it to display in.

=AVERAGE(A2:A6)