If the dates in column F is >= the date in cell C1 AND <= the date in cell D1, then show the average of column F minus column E. However, when there are no dates that fall within the range of cell C1 and D1, it gives me a #DIV/O error. How can get rid of this error?
=ArrayFormula(AVERAGE(IF((Orders!$F:$F>=C$1)*(Orders!$F:$F<=(D$1-(1/86400))),Orders!$F:$F-Orders!$E:$E)))
Thank you.
=ArrayFormula(AVERAGE(IF((Orders!$F:$F>=C$1)*(Orders!$F:$F<=(D$1-(1/86400))),Orders!$F:$F-Orders!$E:$E)))
Thank you.