take an average only cells with data

futurejock

New Member
Joined
May 31, 2009
Messages
20
Hi I'd like to ask a cell to calculate an average of data (numbers) in a column.

I'd like to be able to insert rows to increase the column length accomodating new data as it comes in.

Also if I clear a cell in the column from a previous quantity to zero, I want it to be left our of the average; that is zero does not equal a zero value instance, and should not count as an increase in the denominator of the average; that is not 0/1 but rather as if it did not exist.

I can make a zero cell blank but would rather allow either "0" or blank to not count in the average.

Finally and this would be so cool I'd like the average to refer to a column that accounts the date of the entry, and for the avergae to filter for only one week at a time ending on Fridays.

If that would be possible I'd love to have a pop up calendar in my date column, and if that helps to make this easier to then I'd need to know how to do that. Currently I hand enter dates nn/dd/yy

Thanks
 

Excel Facts

Add Bullets to Range
Select range. Press Ctrl+1. On Number tab, choose Custom. Type Alt+7 then space then @ sign (using 7 on numeric keypad)
For the first part

=AVERAGE(IF(A:A<>0,A:A))

Entered using CTRL + Shift + Enter
 
Upvote 0
Taking up the first question...

Hi I'd like to ask a cell to calculate an average of data (numbers) in a column.

I'd like to be able to insert rows to increase the column length accomodating new data as it comes in.

Also if I clear a cell in the column from a previous quantity to zero, I want it to be left our of the average; that is zero does not equal a zero value instance, and should not count as an increase in the denominator of the average; that is not 0/1 but rather as if it did not exist.

I can make a zero cell blank but would rather allow either "0" or blank to not count in the average.

Let column A the column of interest...

=SUMIF(A:A,">0")/COUNTIF(A:A,">0")
 
Upvote 0

Forum statistics

Threads
1,215,514
Messages
6,125,273
Members
449,220
Latest member
Excel Master

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