Search code examples
excelgoogle-sheetsexcel-formulagoogle-sheets-formulaaverage

Average ifs based on column and row in excel/google sheet


So I have this table:

enter image description here

I added 1.5 in B11 and 5 in B12 manually but what formula should I type to get the average for before or equal and after a given date?


Solution

  • try:

    =AVERAGE(FILTER(FILTER(B2:6, A2:A6=B9), B1:1<=B10))
    

    and:

    =AVERAGE(FILTER(FILTER(B2:6, A2:A6=B9), B1:1>B10))
    

    enter image description here