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

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.

shades

Well-known Member
Joined
Mar 20, 2002
Messages
1,550
try this:

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

[EDIT: Sorry, this excludes zeroes, not blanks.]
 

shades

Well-known Member
Joined
Mar 20, 2002
Messages
1,550
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.
 

Forum statistics

Threads
1,147,675
Messages
5,742,546
Members
423,737
Latest member
tom_xls

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