Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations waross on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excel average problem 1

Status
Not open for further replies.

glove419

Computer
Apr 5, 2004
2
When averaging a row of numbers. I am trying to average the last 10 entries. The problem is the row may have blank cells.
Example:
I am using row 3 and columns A-P.
Column entries are as follows;
A=10
B=20
C=(BLANK)
D=40
E=(BLANK
F=(BLANK)
G=70
H=(BLANK)
I=90
J=100
K=10
L=20
M=30
N=40
0=(BLANK)
P=50

this is the formula I am using
:=AVERAGE(OFFSET(INDEX(3:3,,COUNT(A3:T3)),0,-9,1,10))
the result is:55

I Check the answer with =AVERAGE(B3:p3)
this is my desired result:47

Any help is greatly appreciated

Thank you for your time!!
 
Replies continue below

Recommended for you

why not just use sum(b3:p3)/count(b3:p3)?

TTFN
 
Hello,

May have found a long winded solution

in P4 enter this formula

=IF(P3<>"",1,"")

in O4 enter this formula

=IF(AND(SUM($P$4:p4)<10,O3<>""),1,"")

and copy this to A3

in a cell enter this formula

=SUMIF(A4:p4,"=1",A3:p3)/COUNTIF(A4:p4,"=1")

the answer given is 47.

Long winded I know, but it does work, is this a feasable option?

Alternatively if the number of values can change i.e. go beyind column P

enter this formula in A3

=IF(AND(SUM(Q4:$IV$4)<10,P3<>""),1,"")

and copy as far as required.




----------------------------------
Hope this helps.
----------------------------------

maybe only a drafter
but the best user at this company!
 
onlyadrafter

Thanks for the input. Ill try it out and Ill let you know
Thanks again!!!!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor