Forum Discussion

XLXpert's avatar
XLXpert
Copper Contributor
Aug 26, 2022
Solved

Using AVERAGEIF to calculate cells > 0

Good morning,  Help! I have a workbook that I want to find the average in a range IF the cell is >0, the hitch is that it's a MULTIPLE range selection, as in the example below =AVERAGEIF((AH7,AH9,...
  • HansVogelaar's avatar
    Aug 26, 2022

    XLXpert 

    AVERAGEIF won't work, for it expects a contiguous range.

    You might use formulas to place the values that you want to average together in a contiguous range.

    Otherwise, you have to use rather tricky formulas such as

     

    =AVERAGE(IF((AH7:AH11>0)*ISODD(ROW(AH7:AH11)),AH7:AH11))

     

    (If you don't have Microsoft 365 or Office 2021, you probably have to confirm the formula with Ctrl+Shift+Enter)

Resources