How to get an AVERAGE when some cells have NO VALUE

mantis

New Member
Joined
Jun 18, 2008
Messages
41
Hi, I'm hoping someone can help!

I have a spreadsheet that uses an API to gather data from another program and then returns a value into the same cell the API formula is in.

I have 10 of these formulas from A1 to A10. I need an average of these values so i use "=AVERAGE(A1:A10)"

This works great once all 10 cells have a value but the API gathers the info due to specific things happening on the other program so A1 will get a value, then A2 could get a value an hour later, A3 ten minutes after that and so on.

HOW DO I GET EXCEL TO GIVE ME THE AVERAGE OF THE CELLS THAT HAVE A VALUE AND IGNORE THE ONES THAT DONT??????? So it'll give me the average of the first 2 cells, then the first 3 an so on until all 10 have a value.

Many thanks for taking the time to read my problem.

Mantis.
 

Excel Facts

Last used cell?
Press Ctrl+End to move to what Excel thinks is the last used cell.

barry houdini

MrExcel MVP
Joined
Mar 23, 2005
Messages
20,825
Hello mantis, welcome to MrExcel,

AVERAGE function ignores blanks so if the cells without a value are blank =AVERAGE(A1:A10) should still work, if only A1 and A2 have numbers and the others are blank then that formula will just average those two.

If you want to ignore zeroes try

=SUMIF(A1:A10,">0")/MAX(1,COUNTIF(A1:A10,">0"))
 
Upvote 0

kevinwalker

New Member
Joined
Jun 18, 2008
Messages
1
=SUM(C5:C14)/COUNTIF(C5:C14,"<>0")
this is a sample formula that calculated the average of number greater than or less than zero
 
Upvote 0

Forum statistics

Threads
1,191,228
Messages
5,985,392
Members
439,962
Latest member
max_york

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top