Solved

finding average of last 5 payments

Posted on 2014-11-11
4
70 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
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

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

What is a Form List Box? (skip if you know this) The forms List Box is the alternative to the ActiveX list box. If you are using excel 2007, you first make sure you have a developer tab (click the Orb)->"Excel Options"->Popular->"Show Developer tab…
Workbook link problems after copying tabs to a new workbook? David Miller (dlmille) Intro Have you either copied sheets to a new workbook, and after having saved and opened that workbook, you find that there are links back to the original sou…
The viewer will learn how to simulate a series of sales calls dependent on a single skill level and learn how to simulate a series of sales calls dependent on two skill levels. Simulating Independent Sales Calls: Enter .75 into cell C2 – “skill leve…
This Micro Tutorial will demonstrate in Google Sheets how to use the HYPERLINK function to create live links inside your spreadsheet.

708 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now