Average ignoring #N/A (excel)

Solved
huggilou Posted messages 67 Status Membre -  
 gangstapo -
Hello,
I am in the process of making a table with values from other sheets in my workbook.
To prevent zeros from appearing on the graphs, I used the following function: "=IF('Page2'!N76="",NA(),'Page2'!N76).
However, now that I want to calculate the total (with #N/A in the series), Excel indicates "#N/A" (which is normal).

Is there a way to calculate the average while "ignoring" the #N/A values in the series, thus allowing the average to update automatically as the "#N/A" values are replaced with actual values?

I hope I was as clear as possible, and thank you in advance for your responses.
Configuration: Windows XP Firefox 3.0.1 Microsoft Excel 2003

4 réponses

algoplus
 
if it's for the sum:
=SUMIF(range,"<>NA",range)

if it's for the average
=SUMIF(range,"<>NA",range)/COUNTIF(range,"<>#N/A")
21
gangstapo
 
Thank you very much, you are saving my life with your magic formula!!!
0