Hi,
I found similar questions online but none of the answers worked for me.
I need in BD to make an average of the values in color BB7:BB10000, but only if 2 conditions are met (in this case, if the "route" in AP is the same, and if the "week" in AT is the same).
Normally, I would do like this (in row 7):
=AVERAGEIFS($BB$7:$BB$10000;$AP$7:$AP$10000;AP7;$AT$7:$AT$10000;AT7) and drag the formula all the way down.
Of course Average Ifs would work perfectly on a static array of numbers, but I need the calculation to adapt to the filtering, so I need to use subtotal somehow.
I found this formula but I wasn't able to make it work, probably because I do not know how to apply it properly
{=AVERAGE(IF(SUBTOTAL(2,OFFSET(B2,ROW(B2:B100)-ROW(B2),0)),IF(A2:A100="x",B2:B100)))}
Any suggestions?
Thank you
Giovanni
Bookmarks