Averages Excluding empty cells

Jerminator

New Member
Joined
Aug 8, 2002
Messages
33
Ok, I have a Column containing empty cells and some with numbers. What I want to do is average those numbers excluding the empty cells in the average. Now this culumn changes on a monthly basis so, when I drop the info into this worksheet monthly, The blank cells will change rows, so looking for an automated process. I was thinking a IF statement, but not sure of the syntax. An example of what I want to accomplish:

A1: 10
A2:25
A3: Blank Cell
A4:10
A5:Blank Cell
A6:45
A7: 16


Elsewhere Formula to =sum (Data in cells/how many cells with data)

Not sure maybe Excel does this automatically.
 

Excel Facts

Shade all formula cells
To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.
try this:

=SUM(A1:A10)/COUNTIF(A1:A10,"<>0")

[EDIT: Sorry, this excludes zeroes, not blanks.]
 
Upvote 0
Oaktree said:
=AVERAGE(A1:A10) will exclude blanks

While this gives an average excluding blanks, it will include the zero, which may or may not be what the OP wants.
 
Upvote 0

Forum statistics

Threads
1,215,734
Messages
6,126,543
Members
449,316
Latest member
sravya

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
Back
Top