# Averages ignoring zeros

#### ctomblin

##### New Member
I need to calculate "average number of loads per day" for any given number of days. ie. over a 7 day period I only want the average calculated against active days. For example if production only takes place on 3 of the 7 days then the average should be calculated against 3 days not 7.

### Excel Facts

Round to nearest half hour?
Use =MROUND(A2,"0:30") to round to nearest half hour. Use =CEILING(A2,"0:30") to round to next half hour.

#### elgringo56

##### Well-known Member
If you have values in say, A1 down thru A7, but some of the cells in that area are blank, no entries, =AVERAGE(A1:A7) will only look at the cells that have values in them. So, if you take any cells that have zeros in them and make them blank ("") instead of zero, you will only average the cells with numbers.

#### jimboy

##### Well-known Member
or use this;

=SUM(B1:B4)/COUNTIF(B1:B4,"<>0")

#### ctomblin

##### New Member
Thanks guys, =average is fine. I didn't realise XL ignored empty cells.

Replies
15
Views
152
Replies
0
Views
136
Replies
2
Views
110
Replies
3
Views
101
Replies
1
Views
348

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

1,152,115
Messages
5,768,204
Members
425,459
Latest member
Danniey

### 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.

### Which adblocker are you using?

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

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