# formula to compute average of last three numbers while ignoring formulas

#### Kihoro

##### New member
hi guys,:nod:
please find attached worksheet - test1
Am trying to have the formula in c31 sum and calculate the
Average of any last three numbers in range f25:bi25.
I have a formula in cells range AL25:BI25 (=IF(AL4>0,(AL4-AK4)/AK4,"")
That will calculate the percentage as long cell AL4 is greater than zero.
The formula in CI is supposed to calculate the average of the last three numbers while ignoring
The formula in the cell AL25:BI25. The formula returns a #VALUE error
How do I go round this problem?
I want the formula in CI to ignore the formula in cell range AL25:BI25 and just compute the average of the last three numbers only..

#### Attachments

• test1.xlsx
35.6 KB · Views: 16

Nevermind .....

Last edited:

#### tommyt61

##### New member
See if this will work for you.

=AVERAGE(INDEX(f25:bi25,MATCH(9.99999999999999E+307,f25:bI25)-3+1):bi25)

#### Kihoro

##### New member
thanks alot Tommyt61,
it worked.!
much appreciated.
have a good day.