Average last 3 entries

P

Preschool Mike

Can someone help me with some adjustments with this formula that I found in a
search? I need the formula to average the last three entries in a row, which
it does...it even does an average if there are less than three.. which is
also what I want. But I get an error when there are zero numbers which is
what I want to get ride of. I found two other suggestions in my search but I
can't get them to work.

=AVERAGE(INDEX(A4:H4,LARGE(COLUMN(A:Z)*(ISNUMBER(A4:H4)),3)):AB4)
This one works perfectly except I get an error if there are no entries. I
found the follow two formulas that claim to eliminate the problem but don't
seem to work:

=IF(COUNT(A4:H4)=0,"",AVERAGE(INDEX(A4:H4,LARGE(COLUMN(A:Z)*(ISNUMBER(A4:H4)),4)):H4))


=IF(COUNT(A4:H4),AVERAGE(INDEX(A4:H4,LARGE(COLUMN(A:Z)*(ISNUMBER(A4:H4)),3)):H4),"NEED DATA")


Thanks,
 
P

Preschool Mike

Still having trouble. I get a message that says I've entered too many
arguments. I've tried entering it exactly how you suggested but not having
any luck.

Here's my formula again
{=AVERAGE(INDEX(A10:H10,LARGE(COLUMN(A:H)*(ISNUMBER(A10:H10)),3)):H10)}

Here's the changes I made as you suggested. I'm sure I've done something
wrong, but what?

{=IF(ISERROR(AVERAGE(INDEX(A10:H10,LARGE(COLUMN(A:H)*(ISNUMBER(A10:H10)),3)):H10),"",AVERAGE(INDEX(A10:H10,LARGE(COLUMN(A:H)*(ISNUMBER(A10:H10)),3)):H10)))}
 
T

T. Valko

It's not real clear what you want to do.

Do you have 0s entered and you want to exclude those 0s from the average?
Are the numbers to average *always* poitive numbers?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top