Hi,

I have a question about using an AverageIf for two different columns. Let me try to explain. I am using the two formulas below to get a last 10 averageif in each column:

=IFERROR(AVERAGE(IF($G$2:G2=G3,IF(ROW($G$2:G2)>=LARGE(IF($G$2:G2=G3,ROW($G$2:G2)),10),$BW$2:BW2))),"")
=IFERROR(AVERAGE(IF($P$2:P2=P3,IF(ROW($P$2:P2)>=LARGE(IF($P$2:P2=T3,ROW($P$2:P2)),10),$BX$2:BX2))),"")

So, the same set of people are in both columns, but I am averaging, let's say, day shift in one column and night shift in the other. I would like to combine the two and just get an overall average of the last 10 for any person from both columns. I tried this:
=IFERROR(AVERAGE(IF($G$2:P2=G3,IF(ROW($G$2:P2)>=LARGE(IF($G$2:P2=G3,ROW($G$2:P2)),10),$BW$2:BX2))),"")

Obviously, that did not work. Can anyone let me know how this can be done? Thanks