?
Solved

finding average of last 5 payments

Posted on 2014-11-11
4
Medium Priority
?
85 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 800 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 800 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 400 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

This article descibes how to create a connection between Excel and SAP and how to move data from Excel to SAP or the other way around.
When you see single cell contains number and text, and you have to get any date out of it seems like cracking our heads.
This Micro Tutorial will demonstrate in Microsoft Excel how to add style and sexy appeal to horizontal bar charts.
This Micro Tutorial will demonstrate how to create pivot charts out of a data set. I also added a drop-down menu which allows to choose from different categories in the data set and the chart will automatically update.

764 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