Method 2: AVERAGEIFS for multiple criteria\nWhen zeros must be excluded under additional conditions, AVERAGEIFS is a robust choice. It averages values in a target range based on multiple criteria ranges. For example, you might only include rows where a flag column equals "Yes" and the value column is non-zero.\n\nexcel\n=AVERAGEIFS(A2:A100, A2:A100, "<>0")\n\nTo add a second criterion, such as a status column B2:B100 = "Active":\nexcel\n=AVERAGEIFS(A2:A100, A2:A100, "<>0", B2:B100, "Active")\n\nThese patterns scale to more complex datasets while preserving the exclusion of 0s from the final average.
Method 3: Dynamic arrays with FILTER (Excel 365)\nIf you are on Excel 365 or Excel 2021+, dynamic array functions let you filter the data first, then compute the average. This approach is particularly convenient for large datasets or when you want to compose multiple filters.\n\nexcel\n=AVERAGE(FILTER(A2:A100, A2:A100<>0))\n\nYou can combine FILTER with other criteria, for example excluding zeros and removing blanks by using: FILTER(A2:A100, (A2:A100<>0) * (A2:A100<>"")). For readability, you can also use LET to name the filtered array:\nexcel\n=LET(nonZero, FILTER(A2:A100, A2:A100<>0), AVERAGE(nonZero))\n