Sign in with Microsoft
Sign in or create an account.
Hello,
Select a different account.
You have multiple accounts
Choose the account you want to sign in with.

If AVERAGE or SUM refer to cells that contain #VALUE! errors, the formulas will result in a #VALUE! error.

#VALUE! error in AVERAGE

In order to overlook the error values, we’ll construct a formula that ignores the errors in the reference range while calculating the average with the remaining “normal” values.

To work around this scenario, we use a combination of AVERAGE along with IF and ISERROR to determine if there is an error in the specified range. This particular scenario requires an array formula:

=AVERAGE(IF(ISERROR(B2:D2),"",B2:D2))

This is an array formula. So you either need to press ENTER (only if you are using Microsoft 365) or CTRL+SHIFT+ENTER in the formula.

Note: If you have a current version of Microsoft 365, then you can simply enter the formula in the output cell, then press ENTER to confirm the formula as a dynamic array formula. Otherwise, the formula must be entered as a legacy array formula by first selecting the output cell, entering the formula in the output cell, and then pressing CTRL+SHIFT+ENTER to confirm it. Excel inserts curly brackets at the beginning and end of the formula for you. For more information on array formulas, see Guidelines and examples of array formulas.

Array function in AVERAGE to resolve the #VALUE! error

Note: The above function will not only work for #VALUE!, but also for #N/A, #NULL, #DIV/0!, and others.

You could also use SUM in the same fashion:

=SUM(IF(ISERROR(B2:D2),"",B2:D2))

Need more help?

You can always ask an expert in the Excel Tech Community or get support in Communities.

See Also

Correct a #VALUE! error

AVERAGE function

SUM function

Overview of formulas in Excel

Detect errors in formulas

All Excel functions (alphabetical)

All Excel functions (by category)

Need more help?

Want more options?

Explore subscription benefits, browse training courses, learn how to secure your device, and more.

Communities help you ask and answer questions, give feedback, and hear from experts with rich knowledge.

Was this information helpful?

What affected your experience?
By pressing submit, your feedback will be used to improve Microsoft products and services. Your IT admin will be able to collect this data. Privacy Statement.

Thank you for your feedback!

×