Wednesday, July 6, 2016

[Anwsered] AVERAGE ONLY A SPECIFIC NUMBER OF VALUES IN A LONGER LIST OF VALUES

AVERAGE ONLY A SPECIFIC NUMBER OF VALUES IN A LONGER LIST OF VALUES

I am trying to average a set number of values in a longer list of values.  However, the values in the list must meet a specific criteria to be considered for the average.
For example, in Column A, I have 500 values that indicate the ranks of race results from 5 different disciplines.  Column B indicates the discipline for each value:
 

Rank
Discipline

3
DH

21
SG

7
SL

6
GS

10
DH

12
SG

 
For ease, let's assume that there are 100 entries for each of the 5 disciplines, for a total of 500 entries.  First, I'd like the equation to recognize that the value is from only 1 of the 5 disciplines (i.e.
SG).  Second, once it has recognized all of the
entries from a given discipline, I only want it to calculate the average for the 20 most recent entries (Remember, there are 100 total entries for a discipline.), not all 100 entries.
If possible, I'm hoping to do this without VBA, Pivot Tables, or Filters because I have another slew equations reading the raw data set, which would be negatively affected if I processed the raw data with pivots, etc.
Thanks.

Solutions to the Problem AVERAGE ONLY A SPECIFIC NUMBER OF VALUES IN A LONGER LIST OF VALUES

Download Error Fixer for Free Now

I've incorporated a 'helper' column that contains an arrayed LARGE()/IF() formula to gain the 20th date and used that in more traditional AVERAGEIFS() formulas for the following:
Figure 1.0 - Dated Averages
First, I'd like the equation to recognize that the value is from only 1 of the 5 disciplines (i.e.
SG).
 Column F contains an average of the Rank column (A) if the Discipline matches the value in E.
=AVERAGEIFS(A$2:A$501,B$2:B$501,E2)
Second, once it has recognized all of the entries from a given discipline, I only want it to calculate the average for the 20 most recent entries
I didn't know what you meant by "most recent entries" so I created a column of random dates in column C.
Column G uses LARGE() and IF() in an array formula to get the 20th most recent date for the Discipline in column E.
=LARGE(IF(B$2:B$501=E2,C$2:C$501,0),G$1)
(press CTRL+SHIFT+ to finalize an array formula) Note that the formula references G$1 for the 20 value.
G1 contains 20 with Custom Number Formatting as 0"th Date Rank".
With the 20th Date Rank in column G, column H can use this in a AVERAGEIFS() formula.
=AVERAGEIFS(A$2:A$501,B$2:B$501,E2,C$2:C$501,">="&G2)
Sample worksheet at:
http://cid-161352ce07628e22.office.live.com/view.aspx/Social%20Answers%20Examples/Dated%20Average.xlsx

"Have you tried turning it off and then on again?" - Roy from 'The IT Crowd' (Emmy award-winning British comedy)

Hmm, This can lead to erroneous results if there are more than one values  for the same discpline and the same date as the 20th rank of that discipline.
I think you need something like
http://sulprobil.com/html/sbsumlast.html to be on the safe side.
Regards,
Bernd
http://www.sulprobil.com/html/excel_forums.html

If you failed to fix it, another option is to call Microsoft and walk through the process with a technician. To do this, dial "1-800-936-5700". Explain the error that you received and the steps in the update process during which it was displayed. The technician will be able to walk through the steps from getting a new product key to finishing the installation.

Recommended Method to Repair the Problem: AVERAGE ONLY A SPECIFIC NUMBER OF VALUES IN A LONGER LIST OF VALUES:

How to Fix AVERAGE ONLY A SPECIFIC NUMBER OF VALUES IN A LONGER LIST OF VALUES with SmartPCFixer?

1. Click the button to download SmartPCFixer . Install it on your system.  Open it, and it will scan your computer. The junk files will be shown in the list.

2. After the scan is finished, you can see the errors and problems need to be repaired. Click Fix All.

3. The Fixing part is done, the speed of your computer will be much higher than before and the errors have been removed.


Related: AMD Radeon HD 7800M Win8 not working [Anwsered],I can access the internet, get on facebook and get to hotmail, but I can't play games on facebook and I can't open or respond to my e-mails,I keep getting this Media Player error when I log on my computer. [Anwsered],[Anwsered] System Hanging on shutdown and restart,Unable to get the Vlookup property of the WorksheetFunction class,Solution to Error: Error: "0x81000032 make sure the C: drive is online and set to NTFS" when trying to backup to external hard drive.
,Troubleshoot:External Hard Drive not listed in Windows 7 backup wizard Error
,I'm always being signed off so annoying Tech Support
,Solution to Problem: Impossible to use Internet Explorer! I keep getting the same error message every time i try to use IE.
,Solution to Problem: Referencing data in another file
,Troubleshoot:Error: "0x81000032 make sure the C: drive is online and set to NTFS" when trying to backup to external hard drive. Error,External Hard Drive not listed in Windows 7 backup wizard Tech Support,Tech Support: I'm always being signed off so annoying,Solution to Problem: Impossible to use Internet Explorer! I keep getting the same error message every time i try to use IE.,Referencing data in Access using Excel [Anwsered],Need Best Way To Present Data [Anwsered],Same question but for windows 7 home edition,sometimes fullscreen won't activate [Solved],Solution to Error: We bought a new computer with windows 7 and it is constantly freezing. How do we fix this?,Solution to Error: Windows 8 update crash (2013-07-22)
Read More: Tech Support: Backup Failed Error Codes 0x80070005 AND 0x8078008A.,Solution to Error: Auto Create Hyperlinks,Troubleshooting:Avg. Disk Queue Length is 2. The disk may be at its maxium transfer capacity due to throughput and disk seeks Error,How Can I Fix - autocad 2007 cant be installed.says some compatible issues.how do i fix it?,backup set up screen will not show external USB connected HD networked on 2nd PC Tech Support,application not found error,any problems in a team where one has Windows XP and the other has Windows 7?,Application/Object-Defined Error,An Excel formula question where hours are totalled and cumulating,Anyone know the hardware email?

No comments:

Post a Comment