Get average based on value in another row

前端 未结 3 1761
我在风中等你
我在风中等你 2021-01-07 04:58

I have values in an Excel file like this:

QR  |  QR AVG  |  val1  |
q1                5
q1                3
q1                4
q2                7
q2                


        
相关标签:
3条回答
  • 2021-01-07 05:36

    Try this: =AVERAGEIF($A$2:$A$13,A2,$C$2:$C$13)

    That should go in column B (QR Average) in each cell. The middle param will automatically change, of course.

    0 讨论(0)
  • 2021-01-07 05:48

    Create a pivot table at the same spreadsheet.

    Select columns A, B and C (Sheet1!$A:$C). Click "Insert", and then "Pivot Table".

    Place QR at "Row Labels" field and Val1 (as average) at the "Values" field.

    Then, use in B2:

    =VLOOKUP(A2,$E$2:$F$6,2,1)  
    

    Drag the formula to all cells in column B.

    It will look like this:

    enter image description here:

    0 讨论(0)
  • 2021-01-07 05:53

    Try this function adjusting ranges inside:

    =AVERAGEIF($A$2:$A$17,A2,$C$2:$C$17)
    
    0 讨论(0)
提交回复
热议问题