I'm trying to figure out a way to make an excel spreadsheet that will help me
out with my players golf scores. I'd like a spreadsheet that I can enter
scores in for each player daily, but will only give me an average for the
lowest 4 out of their most recent 5 scores. I'd like to have their older
scores still visible on the spreadsheet, but not used in the calculation of
their average. In case I'm as confusing as I figure I am, here's an example:
Say Billy turns in 6 practice scores, I'd like the spreadsheet to have all 7
scores on it, but only give me an average of the 4 lowest scores he's turned
in out of his latest 5 scores....ignoring his first two scores.
|
|
0
|
|
|
|
Reply
|
Utf
|
3/6/2010 6:02:01 AM |
|
On Fri, 5 Mar 2010 22:02:01 -0800, houndawg
<houndawg@discussions.microsoft.com> wrote:
>I'm trying to figure out a way to make an excel spreadsheet that will help me
>out with my players golf scores. I'd like a spreadsheet that I can enter
>scores in for each player daily, but will only give me an average for the
>lowest 4 out of their most recent 5 scores. I'd like to have their older
>scores still visible on the spreadsheet, but not used in the calculation of
>their average. In case I'm as confusing as I figure I am, here's an example:
>
>Say Billy turns in 6 practice scores, I'd like the spreadsheet to have all 7
>scores on it, but only give me an average of the 4 lowest scores he's turned
>in out of his latest 5 scores....ignoring his first two scores.
Assuming that the scores are in column A starting in cell A1 and that
all scores are positive numbers.
Try this formula:
=AVERAGE(SMALL(OFFSET(A1,MAX((A1:A100>0)*ROW(A1:A100))-5,,5),{1,2,3,4}))
Note: This is an array formula that should be confirmed with
CTRL+SHIFT+ENTER rather than just ENTER.
Change the 100 in both places to reflect the maximum number of scores
to be in column A.
Hope this helps / Lars-�ke
|
|
0
|
|
|
|
Reply
|
Lars
|
3/6/2010 7:17:58 AM
|
|
If A1 contains players name and b1, c2, d1 etc contain scores.
I've made a very simple perhaps ugly solution.
In F2 input =SUM(B1:F1)-MAX(B1:F1)
That gives the total less the highest - I'm struggling to average that
figure. Logically it should be divided by 4 but it won't work.
To get round this in F3 input F2/4
Hide row 2
I only give this half baked solution as I'd love to know why my formula
won't work with a /4 tagged on.
--
Russell Dawson
Excel Student
Please hit "Yes" if this post was helpful.
"houndawg" wrote:
> I'm trying to figure out a way to make an excel spreadsheet that will help me
> out with my players golf scores. I'd like a spreadsheet that I can enter
> scores in for each player daily, but will only give me an average for the
> lowest 4 out of their most recent 5 scores. I'd like to have their older
> scores still visible on the spreadsheet, but not used in the calculation of
> their average. In case I'm as confusing as I figure I am, here's an example:
>
> Say Billy turns in 6 practice scores, I'd like the spreadsheet to have all 7
> scores on it, but only give me an average of the 4 lowest scores he's turned
> in out of his latest 5 scores....ignoring his first two scores.
>
|
|
0
|
|
|
|
Reply
|
Utf
|
3/6/2010 8:12:01 AM
|
|
I meant to say that you can then drag the formulae across which will give you
a continous rolling average as scores come in.
--
Russell Dawson
Excel Student
Please hit "Yes" if this post was helpful.
"houndawg" wrote:
> I'm trying to figure out a way to make an excel spreadsheet that will help me
> out with my players golf scores. I'd like a spreadsheet that I can enter
> scores in for each player daily, but will only give me an average for the
> lowest 4 out of their most recent 5 scores. I'd like to have their older
> scores still visible on the spreadsheet, but not used in the calculation of
> their average. In case I'm as confusing as I figure I am, here's an example:
>
> Say Billy turns in 6 practice scores, I'd like the spreadsheet to have all 7
> scores on it, but only give me an average of the 4 lowest scores he's turned
> in out of his latest 5 scores....ignoring his first two scores.
>
|
|
0
|
|
|
|
Reply
|
Utf
|
3/6/2010 8:14:01 AM
|
|
Are there/will there be any empty cells within the range? For example:
A2 = 77
A3
A4 = 82
A5 = 83
A6 = 80
A7
A8
A9 = 79
The average would include 77, 79, 80, 82.
What should happen if there aren't at least 5 scores?
--
Biff
Microsoft Excel MVP
"houndawg" <houndawg@discussions.microsoft.com> wrote in message
news:2C6AE611-E51E-4211-94B7-B6C09068F668@microsoft.com...
> I'm trying to figure out a way to make an excel spreadsheet that will help
> me
> out with my players golf scores. I'd like a spreadsheet that I can enter
> scores in for each player daily, but will only give me an average for the
> lowest 4 out of their most recent 5 scores. I'd like to have their older
> scores still visible on the spreadsheet, but not used in the calculation
> of
> their average. In case I'm as confusing as I figure I am, here's an
> example:
>
> Say Billy turns in 6 practice scores, I'd like the spreadsheet to have all
> 7
> scores on it, but only give me an average of the 4 lowest scores he's
> turned
> in out of his latest 5 scores....ignoring his first two scores.
>
|
|
0
|
|
|
|
Reply
|
T
|
3/6/2010 6:04:51 PM
|
|
Hello,
> ...
> What should happen if there aren't at least 5 scores?
> ...
Does not matter. Array-enter
=AVERAGE(SMALL(A1:A99,ROW(INDIRECT("1:"&MIN(COUNTA(A1:A99),4)))))
Regards,
Bernd
|
|
0
|
|
|
|
Reply
|
Bernd
|
3/6/2010 6:43:25 PM
|
|
On 6 Mrz., 19:43, Bernd P <bplumh...@gmail.com> wrote:
> Hello,
>
> > ...
> > What should happen if there aren't at least 5 scores?
> > ...
>
> Does not matter. Array-enter
> =AVERAGE(SMALL(A1:A99,ROW(INDIRECT("1:"&MIN(COUNTA(A1:A99),4)))))
>
> Regards,
> Bernd
Not most recvent, though.
Regards,
Bernd
|
|
0
|
|
|
|
Reply
|
Bernd
|
3/6/2010 7:06:47 PM
|
|
>>What should happen if there aren't at least 5 scores?
>Does not matter.
You must have magical powers. You're so good you can read the OP's mind?
>=AVERAGE(SMALL(A1:A99,ROW(INDIRECT("1:"&MIN(COUNTA(A1:A99),4)))))
That won't do what the OP asked for.
--
Biff
Microsoft Excel MVP
"Bernd P" <bplumhoff@gmail.com> wrote in message
news:9d1c2b5d-8623-4398-9d91-3092169f011c@19g2000yqu.googlegroups.com...
> Hello,
>
>> ...
>> What should happen if there aren't at least 5 scores?
>> ...
>
> Does not matter. Array-enter
> =AVERAGE(SMALL(A1:A99,ROW(INDIRECT("1:"&MIN(COUNTA(A1:A99),4)))))
>
> Regards,
> Bernd
|
|
0
|
|
|
|
Reply
|
T
|
3/6/2010 7:08:40 PM
|
|
Hello,
Two steps:
Array-enter into B1:B5:
=INDEX(A1:A99,LARGE(IF(A1:A99<>"",ROW(A1:A99)),ROW(INDIRECT("1:"&MIN(COUNTA(A1:A99),
5)))),1)
Then array-enter into C1:
=AVERAGE(SMALL(B1:INDEX(B1:B5,MIN(COUNTA(A1:A99),
5));ROW(INDIRECT("1:"&MIN(COUNTA(A1:A99),4)))))
But that's quite complex. Maybe better to take a UDF.
Regards,
Bernd
|
|
0
|
|
|
|
Reply
|
Bernd
|
3/6/2010 7:24:37 PM
|
|
>But that's quite complex.
Not really, but you're making it more complex than need be. Why 2 formulas?
--
Biff
Microsoft Excel MVP
"Bernd P" <bplumhoff@gmail.com> wrote in message
news:53799cc9-5258-4980-a305-aacb241a38d6@q21g2000yqm.googlegroups.com...
> Hello,
>
> Two steps:
>
> Array-enter into B1:B5:
> =INDEX(A1:A99,LARGE(IF(A1:A99<>"",ROW(A1:A99)),ROW(INDIRECT("1:"&MIN(COUNTA(A1:A99),
> 5)))),1)
>
> Then array-enter into C1:
> =AVERAGE(SMALL(B1:INDEX(B1:B5,MIN(COUNTA(A1:A99),
> 5));ROW(INDIRECT("1:"&MIN(COUNTA(A1:A99),4)))))
>
> But that's quite complex. Maybe better to take a UDF.
>
> Regards,
> Bernd
|
|
0
|
|
|
|
Reply
|
T
|
3/6/2010 9:56:54 PM
|
|
Hello Biff,
> ...
> Not really, but you're making it more complex than need be. Why 2 formulas?
> ...
Try it with one only. INDEX is "cell-bound". If you try it, take care
of possible gaps (empty cells) and of the fact that there might be
less than 5 values, please.
With a VBA function you could just start from the last entry, step
back to the fifth-last-filled, calculate the result and stop.
Regards,
Bernd
|
|
0
|
|
|
|
Reply
|
Bernd
|
3/7/2010 8:49:58 AM
|
|
>Try it with one only. INDEX is "cell-bound".
>If you try it, take care of possible gaps
>(empty cells) and of the fact that there
>might be less than 5 values, please.
Array entered...
=IF(COUNT(A2:A100),AVERAGE(SMALL(INDEX(A:A,LARGE((A2:A100<>"")*ROW(A2:A100),MIN(COUNT(A2:A100),5))):A100,ROW(INDIRECT("1:"&MIN(COUNT(A2:A100),4))))),"")
We can also use a non-volatile version but it would be a bit longer.
If the OP only wants the average if there are at least 5 scores...
Array entered...
=IF(COUNT(A2:A100)<5,"",AVERAGE(SMALL(INDEX(A:A,LARGE((A2:A100<>"")*ROW(A2:A100),5)):A100,{1,2,3,4})))
--
Biff
Microsoft Excel MVP
"Bernd P" <bplumhoff@gmail.com> wrote in message
news:7ffab2a3-9184-46e2-912a-22cc463c95e9@q21g2000yqm.googlegroups.com...
> Hello Biff,
>
>> ...
>> Not really, but you're making it more complex than need be. Why 2
>> formulas?
>> ...
>
> Try it with one only. INDEX is "cell-bound". If you try it, take care
> of possible gaps (empty cells) and of the fact that there might be
> less than 5 values, please.
>
> With a VBA function you could just start from the last entry, step
> back to the fifth-last-filled, calculate the result and stop.
>
> Regards,
> Bernd
|
|
0
|
|
|
|
Reply
|
T
|
3/7/2010 5:51:14 PM
|
|
Hello Biff,
Nice one. Also quicker than mine.
I would not call it less complex, though.
The VBA solution which I had in mind:
Function Avg4Last5(r As Range) As Double
Dim i As Long, n As Long
Dim dSum As Double, dMax As Double
i = r.Count
n = 0
dSum = 0#
Do While i > 0 And n < 5
If Not IsEmpty(r(i)) Then
If r(i) > dMax Or n = 0 Then
dMax = r(i)
End If
dSum = dSum + r(i)
n = n + 1
End If
i = i - 1
Loop
Select Case n
Case 5
Avg4Last5 = (dSum - dMax) / 4#
Case 0
Avg4Last5 = CVErr(xlErrNum)
Case Else
Avg4Last5 = dSum / n
End Select
End Function
With about 200 rows this VBA is quicker than both worksheet function
approaches. Not that I think golfers play that many rounds - I just
think this VBA function is easier to use and to understand.
Regards,
Bernd
|
|
0
|
|
|
|
Reply
|
Bernd
|
3/8/2010 7:47:54 PM
|
|
>I just think this VBA function is easier to use and to understand.
And, because I'm not much of a programmer, I think formulas are easier to
use and understand!
--
Biff
Microsoft Excel MVP
"Bernd P" <bplumhoff@gmail.com> wrote in message
news:efdcf7db-f97b-4e60-aea9-767196dad596@t23g2000yqt.googlegroups.com...
> Hello Biff,
>
> Nice one. Also quicker than mine.
>
> I would not call it less complex, though.
>
> The VBA solution which I had in mind:
>
> Function Avg4Last5(r As Range) As Double
> Dim i As Long, n As Long
> Dim dSum As Double, dMax As Double
> i = r.Count
> n = 0
> dSum = 0#
> Do While i > 0 And n < 5
> If Not IsEmpty(r(i)) Then
> If r(i) > dMax Or n = 0 Then
> dMax = r(i)
> End If
> dSum = dSum + r(i)
> n = n + 1
> End If
> i = i - 1
> Loop
> Select Case n
> Case 5
> Avg4Last5 = (dSum - dMax) / 4#
> Case 0
> Avg4Last5 = CVErr(xlErrNum)
> Case Else
> Avg4Last5 = dSum / n
> End Select
> End Function
>
> With about 200 rows this VBA is quicker than both worksheet function
> approaches. Not that I think golfers play that many rounds - I just
> think this VBA function is easier to use and to understand.
>
> Regards,
> Bernd
|
|
0
|
|
|
|
Reply
|
T
|
3/9/2010 12:00:29 AM
|
|
|
13 Replies
830 Views
(page loaded in 0.263 seconds)
Similiar Articles: Finding Average of last 5 entries - microsoft.public.excel ...I'm trying to figure out a way to make an excel spreadsheet that will help me out with my players golf scores. I'd like a spreadsheet that I can en... Formula to average last 25 entries in a column? - microsoft.public ...Need to ignore 0s and blank cells in average formula ... ... Add AVERAGE column to Pivot Table - microsoft.public ... Finding Average of last 5 entries - microsoft.public ... Remember last entries in a forms text box or combo box - microsoft ...I would like a text box (and a combo box) on a form to remember the last entry, but still be able to be changed if necessary. Can someone point me to... How to?? Exclude top 5% and bottom 5% and calculate an average per ...Average Top Mid And Bottom I am needing to do a ... which will result in the average of the five ... have 597 calls taken at 5:20 per call. I need to see what the new ... Average value only for the filtered area.. - microsoft.public ...Finding Average of last 5 entries - microsoft.public.excel ... I'm trying to figure out a way to make an excel spreadsheet ... Average value only for the filtered area ... Last entry in a column - microsoft.public.excelFinding Average of last 5 entries - microsoft.public.excel ... Finding Average of last 5 entries - microsoft.public.excel ... How do I get the last 7 characters of a no ... Dropping the lowest value - microsoft.public.mac.office.excel ...Formula to average last 25 entries in a column? - microsoft.public ... Force entry in one cell due to the value in ... The Lowest - I need to ... to average the last four ... last entry per record query.. - microsoft.public.access.queries ...Entry into One form ... Record To ... Group in Query I'm working with a table that has daily entries per item. I'm trying to pull the last 5 dates (records ... Calculate Checkboxes to average total - microsoft.public.word.vba ...... with the bookmark name of Average to hold the average, and then set a macro containing the following code to be run on entry to ... Calculate How Long Funds Will Last ... remember the last entry in a text box on a form - microsoft.public ...I am currently trying to get a form entry text box to remember the last entry so as not to have to retype it each time. I am using this code: Private... Automatic Formula Update - microsoft.public.excel.worksheet ...The difference between the last average and the first appears in a seperate cell. ... the sume of cell values in a table column ... Update Cell From New Row Entries ... Median calculation - microsoft.public.access.queriesAverage Goal Calculation - microsoft.public.excel.misc I am trying to average 35 every week in my Sunday school. Last week, I had 32, the week before that 36. Finding Dups in one column then delete leaving one - microsoft ...... Copy these two cells down through the last ... Macro for Finding Duplicate Data Entries - microsoft.public.word ... ... How to Find Duplicate Data in Excel Spreadsheet ... Last record/entry from a table - microsoft.public.access.queries ...My table has three columns, AcctNum, TransDate, SeqNum I need a query that only displays the last "SeqNum" when an "AcctNum" had multiple entries o... Calculate the position of a formula and number of cells from it ...find the last occurance of a character in a cell - microsoft ..... 1st occurance ... Whether you want to multiply, add, subtract or find the average of numbers ... column ... Average Days to Pay - microsoft.public.greatplainsCount number of entries each day - microsoft.public ... ... Calculate How Long Funds Will Last - microsoft.public.excel ... Average Days to Pay ... Query Help: Average of Columns Per Row - microsoft.public.access ...... Values()) 'John Spencer UMBC CHPDM 'Last Update: April 5, 2000 'Calculates the arithmetic average ... I can't find the right way to find to the summary; average and Max ... Populate form from text box entry - microsoft.public.access.forms ...Remember last entries in a forms text box or combo box - microsoft ... Populate form from text box entry - microsoft.public.access.forms ... Remember last entries in a ... Average of absolute values of moving ranges - microsoft.public ...... example below, we'll say that's in cell G3 If the weekly sheets are contiguous, then you can reference the first and last sheets in the group to get the average ... Last records from a Group By query - microsoft.public.access ...I would like to write a query to find the last (most recent date) records only from ... last entry per record query.. - microsoft.public.access.queries ... Hi and thanks ... Finding Average of last 5 entries - microsoft.public.excel ...I'm trying to figure out a way to make an excel spreadsheet that will help me out with my players golf scores. I'd like a spreadsheet that I can en... How do I find the average of the last 5 entries when I am adding ...I run a golf league and have to do handicaps. Each week I post the score and have to do an average to figure out handicaps. We use the last 5 weeks. There are some ... EXCEL FUNCTION to find average of only the most recent 'x number ...=IF(D30="", "", AVERAGE(D27:D30)) Is that just how you say "if there is an entry, then find the average of the last 4 cells" Seems weird with the two sets of "" . Excel A "running average" that averages only the last 8 entries?Excel tips and Excel help from the MrExcel Message Board regarding A "running average" that averages only the last 8 entries? Find indices and values of nonzero elements - MATLABind = find(X, k, 'last') returns at most the last k indices corresponding to the nonzero entries of X. [row,col] = find(X, ...) returns the row and column indices of the ... Calculate the average of numbers - Excel - Office.comLet's say you want to find the average number of days to complete a ... Averages the top three and the last number in the list (7.5) =AVERAGE(IF(A2:A7<>0, A2:A7,"")) Selecting last five entries - Microsoft AnswersI would like a formula that selects only the entries in the last five (bottom five ... If there are >=5 and <=10 scores the formula will average the lowest 5 scores. Excel :: Moving Average Ecluding Blank CellsIn the adjacent column I want to take the moving average of the last 4 data points including the most recent entry. My problem is i do not know how to handle blank cells ... Excel FormulasTo average the N smallest numbers in a range, use the array formula =AVERAGE ... To find the last entry in the second column of DataRange2, use the following array formula: Rolling Average in Excel - PC Review - Computer News and ReviewsI want to have two averages for this, the average of all data in the column and the average of just the last 5 entries so that as I add another number to the list it'll 7/23/2012 7:46:00 PM
|