# Automatic average calculation when filling in data in cell

#### Mokiekie

##### New Member
Hi,

I am trying to find a formula which will automaticly calculate the average of cells in a seperate cell when I enter data to the cells. i.e. I have four cells and then I have to device the total average by 4 if there have been 4 entries,If there is one cell empty I have to device it by 3, I'm sure there will be a way to calculate such thing automaticly somehow. Sorry for the nitwit question but I am learning....

### Excel Facts

To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.
Hello and welcome to MrExcel.

Excel ignores blanks when calculating an average so you can use for example

=AVERAGE(A1:A4)

to get the average of whatever is in those cells.

Ok, i've must have explained it the wrong way what I want to achieve...

I have 4 cells i.e : H4 , P4,H24 & P24 with a certain percentage in it,
then I want to have in cell A67 an average of the percentage of the 4 cells which I was reffering to, the only thing is that not all cells will be filled in all the time...I're tried some average opions already but they don't seem to work....

Why VoG's answer is not enough:
=AVERAGE(H4,P4,H24,P24) will do the average for 3 values if one of them is empty

Thanks, it's solved thanks to you guys, I am totally happy....

Formula I used by the way : =IF(ISERROR(AVERAGE(H4;P4;H24;P24));"";AVERAGE(H4;P4;H24;P24))

Replies
3
Views
131
Replies
8
Views
210
Replies
2
Views
140
Replies
1
Views
91
Replies
8
Views
210

1,207,420
Messages
6,078,435
Members
446,337
Latest member
nrijkers

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