Solved

finding average of last 5 payments

Posted on 2014-11-11
4
78 Views
Last Modified: 2014-11-15
hi Folks
Got this issue. A customer wants to find a way to calculate the average of the last 5 payments made to employees. I've attached a file with the required answer...of course people will finish at different times, they may not get paid every week. So essentially it means find the last 5 cells with entries in them and get the average..
finding-average-of-last-5-payments.xlsx
0
Comment
Question by:agwalsh
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 18

Assisted Solution

by:krishnakrkc
krishnakrkc earned 200 total points
ID: 40434656
Hi

There may be better ways...In M3 and copied down

=AVERAGE(INDEX(B3:L3,,LARGE(IF(B3:L3<>"",COLUMN(B3:L3)-COLUMN(B3)+1),5)):L3)

It's an array formula. Confirmed with CTRL+SHIFT+ENTER

Kris
0
 
LVL 85

Assisted Solution

by:Rory Archibald
Rory Archibald earned 200 total points
ID: 40434657
In M3:
=AVERAGE((INDEX(B3:L3,LARGE(IF(B3:L3<>"",COLUMN(B3:L3)-1),MIN(5,COUNT(B3:L3)))):L3))
entered with Ctrl+Shift+Enter, then fill down.

(the MIN part is there in case there are less than 5 numbers available)
0
 
LVL 2

Accepted Solution

by:
Pratik Makwana earned 100 total points
ID: 40434679
attached is your excel with result...
finding-average-of-last-5-payments-1-res
0
 

Author Closing Comment

by:agwalsh
ID: 40444228
@Rory Archibold and @ krishnakrkc. Thank you both for an elegant, wonderful formula. A Thing of Beauty indeed. I gave Rory the Best Solution because he wove the Min function into it. @Pratik. I gave you a lower score because I simply couldn't open the file you sent me.
0

Featured Post

Instantly Create Instructional Tutorials

Contextual Guidance at the moment of need helps your employees adopt to new software or processes instantly. Boost knowledge retention and employee engagement step-by-step with one easy solution.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This tutorial explains how to create a series of drop-down lists that are dependent upon prior selections to guide (“force”) the user to make the correct selection and reduce data errors within Microsoft Excel. Excel 2010 was used for this tutorial;…
Do you use a spreadsheet like Microsoft's Excel?  Have you ever wanted to link out to a non excel file on your computer or network drive?  This is the way I found to do it!
This Micro Tutorial will demonstrate the scrolling table in Microsoft Excel using the INDEX function.
This Micro Tutorial demonstrates in Microsoft Excel how to consolidate your marketing data by creating an interactive charts using form controls. This creates cool drop-downs for viewers of your chart to choose from.

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question