#### jjcsjc

##### New Member
I have a column of 2 digit numbers. I want to average the last three cells. sometimes there are blank cell in the column.
A1 42
A2 43
A3 44
A4
A5 41
A6 46

=Average(\$A1:\$A3)-36
=Average(\$A3:\$A6)-36

### Excel Facts

How can you automate Excel?
Press Alt+F11 from Windows Excel to open the Visual Basic for Applications (VBA) editor.
see the method outlined here:

http://www.mrexcel.com/board/viewtopic.php?topic=12570&forum=2

If you change the formula entered in a1 to:

ROW(INDIRECT("1:"&A4))),COLUMN(INDIRECT(A5)))))),"")

(which still needs to be array entered) you can find the average of the last n non-blank cells. (See
http://www.mrexcel.com/tip011.shtml for info on array formulas).

An example follows:
Book6
ABCD
1Result:34.666666744.534.4
2Lasthow-many?345
3Hidethis131313
4Hidethis345
5Hidethis\$B\$7:\$B\$13\$C\$7:\$C\$13\$D\$7:\$D\$13
6
7Data:134835
8114441
92545
10324911
1144
1246
13283940
14
15
Sheet1

After alot of work on my part (Iam not an Excel expert)figuring our the other formulas required, I finaly got it to work. I thank you very much, I could not have done it without your help.

Replies
9
Views
244
Replies
11
Views
600
Replies
2
Views
185
Replies
49
Views
1K
Replies
11
Views
658

1,218,695
Messages
6,143,951
Members
450,517
Latest member
Rovex

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