Forum Discussion

JessT7's avatar
JessT7
Copper Contributor
Oct 14, 2025

IF, AND, AVERAGE help!

Hi All,

I am really stuck and would very much appreciate some help, please!

I need to find the average of a range of data when there are specific "material" types in two different columns.
For example, I want to know if Material A is in range A1:A10 and Material B is in B1:B10 then average the related data in range C1:C10... does that make sense?

Here is an excerpt below of real data... I want to find the average where the secondary material is 'Concrete Fines' has been used with the Primary Material 'Type 1 LS' and find the average of the % Used.
I need to do this for all the different types of Primary and Secondary Material which may be mixed.

DateSecondary MaterialCheaper TonnesPrimary MaterialPrimary TonnesTotal% Used
2 September 25Concrete Fines14.7Type 1 LS144.84159.5410.15%
2 September 25Concrete Fines45.46F5 LS441.22486.6210.29%
2 September 25Concrete Fines44.440mm Scalps425.46469.8610.44%
4 September 25Concrete Fines7.2Type 1 LS143.9151.105.00%
4 September 25Concrete Fines58.340mm Scalps593.44651.749.82%
4 September 25Concrete Fines276F5 LS294.32321.329.17%
5 September 25Concrete Fines16.2Type 1 LS148.02164.2210.94%
5 September 25Concrete Fines42.26F5 LS443.38485.589.52%

Thank you!

 

Jess

1 Reply

  • SergeiBaklan's avatar
    SergeiBaklan
    Diamond Contributor

    As variant

    =GROUPBY(HSTACK(Table1[Secondary Material],Table1[Primary Material]),Table1[% Used], AVERAGE,,0)

Resources