• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Average select values in column based on helper column

I have a list of values in Column A
Column B is a helper column that groups the values together from Column A using numbers
Column C is the results column that returns the average for each group of values in Column A

To note, Columns A and B will be appended with new data daily.

I need a formula in Column C to return the average of the grouped values from Column A.
An example spreadsheet is attached with the correct results highlighted in Column C.
 

Attachments

In D2 formula copied down :

=IF(ROW(A1)<=MAX(B:B),AVERAGEIFS(A:A,B:B,ROW(A1)),"")

Or,

=IF(ROW(A1)<=MAX(B:B),AVERAGEIF(B:B,ROW(A1),A:A),"")

83785
 
I would recommend using Tables (introduce to Excel in 2007) to hold dynamic source data.
The best formula would require Excel 365
Code:
= AVERAGEIFS(Table1[Values],
    Table1[Helper], UNIQUE(Table1[Helper]))
but as long as you can generate a list of distinct helpers the AVERAGEIFS will respond dynamically.
CSE or relative referencing would work for older versions.
83789
 
Back
Top