Add cells and divide total by entries

mattjackson

New Member
Joined
Jan 31, 2017
Messages
11
Hello.

Is there a way to do the following:

I have a 'data entry' section in cells A1:A10 (so 10 cells).

Sometimes I enter figures into all 10 cells, sometimes just a few.

I want cell A11 to add up all entries in A1:A10, and then divide the total by how many entries there were in the range.

Is that possible?

Thanks for any help
 

Excel Facts

Save Often
If you start asking yourself if now is a good time to save your Excel workbook, the answer is Yes
The AVERAGE function already does that, and will ignore any blank entries.
So you should just be use the formula:
=AVERAGE(A1:A10)
 
Upvote 0
I've just added this into my spreadsheet, works great thanks.

1 query though - before there is any data entered into the range (i.e. while A1:A10 has no entries), the cell gives the message #DIV/0!. Is it possible to stop this and just had it be blank?

I tried (with my limited knowledge!) a workaround using conditional formatting - I created a rule that if the cell contained that exact text, the text was coloured white, i.e. so although it's there, it can't be seen, but this didn't work.
 
Upvote 0
Which version of Excel are you on?
If 2007 or later, you can use:
Code:
=IFERROR(AVERAGE(A1:A10),"")
or something like:
Code:
=IF(COUNT(A1:A10)>0,AVERAGE(A1:A10),"")
 
Upvote 0

Forum statistics

Threads
1,223,893
Messages
6,175,244
Members
452,622
Latest member
Laura_PinksBTHFT

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