Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Bernie
I've been using the Callaway s/s that you supplied, and all seems to be well. However... I have the following scores / pars entered in the spreadsheet: Golfer 1 has the following scores: 5, 7, 9, 9, 5, 8, 8, 7, 8, 8, 6, 6, 8, 6, 6, 6, 9, 8 When I total these individually, I get a total of 129. When it gets totalled in the s/s, it shows a total of 125. The hole pars are = 5, 4, 4, 5, 3, 5, 4, 3, 4, 4, 3, 4, 5, 4, 3, 4, 5, 3 This gives a double par total of = 144 As you can see, the hole score is not greater than double the par, so the raw score should be calculated as 129 and not 125 as it is showing. Unless, under the Calloway Rules, the individaul hole scores are checked against their par score. If this is the case, for Hole 3 with a par of 4 but a hole score of 9, the hole would only show a score of 8. If this is replicated over all holes, this would indeed give a total score of 125. Can you help? Rgds Duncs |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Duncs,
As I understand it, and this is how I implemented it, the double par limit is on a per-hole basis. So you are correct: the maximum score on hole 3, where the golfer shot a 9, would be 8 (twice par of 4). HTH, Bernie MS Excel MVP "Duncs" wrote in message ups.com... Bernie I've been using the Callaway s/s that you supplied, and all seems to be well. However... I have the following scores / pars entered in the spreadsheet: Golfer 1 has the following scores: 5, 7, 9, 9, 5, 8, 8, 7, 8, 8, 6, 6, 8, 6, 6, 6, 9, 8 When I total these individually, I get a total of 129. When it gets totalled in the s/s, it shows a total of 125. The hole pars are = 5, 4, 4, 5, 3, 5, 4, 3, 4, 4, 3, 4, 5, 4, 3, 4, 5, 3 This gives a double par total of = 144 As you can see, the hole score is not greater than double the par, so the raw score should be calculated as 129 and not 125 as it is showing. Unless, under the Calloway Rules, the individaul hole scores are checked against their par score. If this is the case, for Hole 3 with a par of 4 but a hole score of 9, the hole would only show a score of 8. If this is replicated over all holes, this would indeed give a total score of 125. Can you help? Rgds Duncs |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
That is correct as per the rules. See quote below.
"The official scorer begins by applying "double-par" stroke control to Howard's card. This means that the score for each hole is compared to double the par for that hole. If any score exceeds double par, the score is downward-adjusted to double-par for that hole. Duncs wrote: Bernie I've been using the Callaway s/s that you supplied, and all seems to be well. However... I have the following scores / pars entered in the spreadsheet: Golfer 1 has the following scores: 5, 7, 9, 9, 5, 8, 8, 7, 8, 8, 6, 6, 8, 6, 6, 6, 9, 8 When I total these individually, I get a total of 129. When it gets totalled in the s/s, it shows a total of 125. The hole pars are = 5, 4, 4, 5, 3, 5, 4, 3, 4, 4, 3, 4, 5, 4, 3, 4, 5, 3 This gives a double par total of = 144 As you can see, the hole score is not greater than double the par, so the raw score should be calculated as 129 and not 125 as it is showing. Unless, under the Calloway Rules, the individaul hole scores are checked against their par score. If this is the case, for Hole 3 with a par of 4 but a hole score of 9, the hole would only show a score of 8. If this is replicated over all holes, this would indeed give a total score of 125. Can you help? Rgds Duncs |
#4
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Bernie & Bob,
Many thanks for getting back to me. Bernie, I bet you thought you'd heard the last of me ;) I've looked at the site that Bob got the information from, and everything seems fine. However, after discussing with a colleague of mine who was also after the s/s, it would appear that all is not well. The website uses a Gross Score, which forms the basis of all calculations. It then works out an Adjusted Gross Score, using the "Double Par" rule. This "Adjusted Gross Score", is then used to lookup the table to identify the number of adjustments. The total of these adjustments, is then subtracted from the "Gross Score". Using your s/s Bernie and the scores in example 2 on the websitge, I get a Calloway Score of 74. However, the example on the site shows a score of 80. I've looked at you code, and attempted to modify it, thinking it would be simple. RawScore = 0 GrossScore = 0 'New variable, as Integer 'Store the used scores from the first 16 holes for later use 'in adjusting the returned score For Hole = 1 To HoleScores.Cells.Count If Hole <= HoleScores.Cells.Count - 2 Then UsedScores(Hole) = Application.Min(HoleScores(Hole).Value, 2 * HolePars(Hole).Value) End If RawScore = RawScore + Application.Min(HoleScores(Hole).Value, 2 * HolePars(Hole).Value) GrossScore = GrossScore + HoleScores(Hole).Value Next Hole 'Callaway = RawScore Callaway = GrossScore However, it now gives me a score of 79, and not the 80 that I would expect. I'm guessing that there is more to it than that though. Perhaps you could assist me? Many thanks Duncs On 30 Jul, 16:13, Bob I wrote: That is correct as per the rules. See quote below. "The official scorer begins by applying "double-par" stroke control to Howard's card. This means that the score for each hole is compared to double the par for that hole. If any score exceeds double par, the score is downward-adjusted to double-par for that hole. Duncs wrote: Bernie I've been using the Callaway s/s that you supplied, and all seems to be well. However... I have the following scores / pars entered in the spreadsheet: Golfer 1 has the following scores: 5, 7, 9, 9, 5, 8, 8, 7, 8, 8, 6, 6, 8, 6, 6, 6, 9, 8 When I total these individually, I get a total of 129. When it gets totalled in the s/s, it shows a total of 125. The hole pars are = 5, 4, 4, 5, 3, 5, 4, 3, 4, 4, 3, 4, 5, 4, 3, 4, 5, 3 This gives a double par total of = 144 As you can see, the hole score is not greater than double the par, so the raw score should be calculated as 129 and not 125 as it is showing. Unless, under the Calloway Rules, the individaul hole scores are checked against their par score. If this is the case, for Hole 3 with a par of 4 but a hole score of 9, the hole would only show a score of 8. If this is replicated over all holes, this would indeed give a total score of 125. Can you help? Rgds Duncs- Hide quoted text - - Show quoted text - |
#5
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Duncs,
Try this version... HTH, Bernie MS Excel MVP Option Explicit Function Callaway(HolePars As Range, _ HoleScores As Range, _ CoursePar As Integer) As Integer Dim AdjGrossScore As Integer Dim GrossScore As Integer Dim InitGross As Integer Dim Hole As Integer Dim NumAdj As Double Dim HAdj As Integer Dim i As Integer Dim UsedScores() As Integer 'Calculate Raw Score ReDim UsedScores(1 To HoleScores.Cells.Count - 2) AdjGrossScore = 0 GrossScore = Application.Sum(HoleScores) InitGross = GrossScore 'Store the used scores from the first 16 holes for later use 'in adjusting the returned score For Hole = 1 To HoleScores.Cells.Count If Hole <= HoleScores.Cells.Count - 2 Then UsedScores(Hole) = Application.Min(HoleScores(Hole).Value, _ 2 * HolePars(Hole).Value) End If AdjGrossScore = AdjGrossScore + Application.Min(HoleScores(Hole).Value, _ 2 * HolePars(Hole).Value) Next Hole Callaway = GrossScore 'Calculate Adjustments If AdjGrossScore CoursePar Then ''Calc the number of highest holes that need to be subtracted ' NumAdj = Int((AdjGrossScore - CoursePar + 1) / 5) * 0.5 + 0.5 NumAdj = Int((Application.Min(AdjGrossScore - CoursePar + 1, 58)) / 5) * 0.5 + 0.5 'Subtract the highest scores from the first 16 holes only For i = 1 To Int(NumAdj) GrossScore = GrossScore - Application.WorksheetFunction.Large(UsedScores, i) Next i 'Possibly, use half the holes score (rounded up to a whole number) If NumAdj < Int(NumAdj) Then GrossScore = GrossScore - Application.RoundUp( _ Application.WorksheetFunction.Large(UsedScores, NumAdj + 0.5) / 2, 0) End If End If 'Calculate Final Handicap Adjustment HAdj = 0 If AdjGrossScore CoursePar + 3 Then HAdj = ((Application.Min(AdjGrossScore - CoursePar + 1, 58)) Mod 5) - 2 End If If AdjGrossScore CoursePar And AdjGrossScore <= CoursePar + 3 Then HAdj = AdjGrossScore - CoursePar - 3 End If 'Output final Callaway score Callaway = Application.Max(InitGross - 50, GrossScore - HAdj) End Function "Duncs" wrote in message ups.com... Bernie & Bob, Many thanks for getting back to me. Bernie, I bet you thought you'd heard the last of me ;) I've looked at the site that Bob got the information from, and everything seems fine. However, after discussing with a colleague of mine who was also after the s/s, it would appear that all is not well. The website uses a Gross Score, which forms the basis of all calculations. It then works out an Adjusted Gross Score, using the "Double Par" rule. This "Adjusted Gross Score", is then used to lookup the table to identify the number of adjustments. The total of these adjustments, is then subtracted from the "Gross Score". Using your s/s Bernie and the scores in example 2 on the websitge, I get a Calloway Score of 74. However, the example on the site shows a score of 80. I've looked at you code, and attempted to modify it, thinking it would be simple. RawScore = 0 GrossScore = 0 'New variable, as Integer 'Store the used scores from the first 16 holes for later use 'in adjusting the returned score For Hole = 1 To HoleScores.Cells.Count If Hole <= HoleScores.Cells.Count - 2 Then UsedScores(Hole) = Application.Min(HoleScores(Hole).Value, 2 * HolePars(Hole).Value) End If RawScore = RawScore + Application.Min(HoleScores(Hole).Value, 2 * HolePars(Hole).Value) GrossScore = GrossScore + HoleScores(Hole).Value Next Hole 'Callaway = RawScore Callaway = GrossScore However, it now gives me a score of 79, and not the 80 that I would expect. I'm guessing that there is more to it than that though. Perhaps you could assist me? Many thanks Duncs On 30 Jul, 16:13, Bob I wrote: That is correct as per the rules. See quote below. "The official scorer begins by applying "double-par" stroke control to Howard's card. This means that the score for each hole is compared to double the par for that hole. If any score exceeds double par, the score is downward-adjusted to double-par for that hole. Duncs wrote: Bernie I've been using the Callaway s/s that you supplied, and all seems to be well. However... I have the following scores / pars entered in the spreadsheet: Golfer 1 has the following scores: 5, 7, 9, 9, 5, 8, 8, 7, 8, 8, 6, 6, 8, 6, 6, 6, 9, 8 When I total these individually, I get a total of 129. When it gets totalled in the s/s, it shows a total of 125. The hole pars are = 5, 4, 4, 5, 3, 5, 4, 3, 4, 4, 3, 4, 5, 4, 3, 4, 5, 3 This gives a double par total of = 144 As you can see, the hole score is not greater than double the par, so the raw score should be calculated as 129 and not 125 as it is showing. Unless, under the Calloway Rules, the individaul hole scores are checked against their par score. If this is the case, for Hole 3 with a par of 4 but a hole score of 9, the hole would only show a score of 8. If this is replicated over all holes, this would indeed give a total score of 125. Can you help? Rgds Duncs- Hide quoted text - - Show quoted text - |
#6
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Bernie,
Many thanks for your time, patience and help with this. It works, obviously! Many thanks Duncs On Jul 31, 8:07 pm, "Bernie Deitrick" <deitbe @ consumer dot org wrote: Duncs, Try this version... HTH, Bernie MS Excel MVP Option Explicit Function Callaway(HolePars As Range, _ HoleScores As Range, _ CoursePar As Integer) As Integer Dim AdjGrossScore As Integer Dim GrossScore As Integer Dim InitGross As Integer Dim Hole As Integer Dim NumAdj As Double Dim HAdj As Integer Dim i As Integer Dim UsedScores() As Integer 'Calculate Raw Score ReDim UsedScores(1 To HoleScores.Cells.Count - 2) AdjGrossScore = 0 GrossScore = Application.Sum(HoleScores) InitGross = GrossScore 'Store the used scores from the first 16 holes for later use 'in adjusting the returned score For Hole = 1 To HoleScores.Cells.Count If Hole <= HoleScores.Cells.Count - 2 Then UsedScores(Hole) = Application.Min(HoleScores(Hole).Value, _ 2 * HolePars(Hole).Value) End If AdjGrossScore = AdjGrossScore + Application.Min(HoleScores(Hole).Value, _ 2 * HolePars(Hole).Value) Next Hole Callaway = GrossScore 'Calculate Adjustments If AdjGrossScore CoursePar Then ''Calc the number of highest holes that need to be subtracted ' NumAdj = Int((AdjGrossScore - CoursePar + 1) / 5) * 0.5 + 0.5 NumAdj = Int((Application.Min(AdjGrossScore - CoursePar + 1, 58)) / 5) * 0.5 + 0.5 'Subtract the highest scores from the first 16 holes only For i = 1 To Int(NumAdj) GrossScore = GrossScore - Application.WorksheetFunction.Large(UsedScores, i) Next i 'Possibly, use half the holes score (rounded up to a whole number) If NumAdj < Int(NumAdj) Then GrossScore = GrossScore - Application.RoundUp( _ Application.WorksheetFunction.Large(UsedScores, NumAdj + 0.5) / 2, 0) End If End If 'Calculate Final Handicap Adjustment HAdj = 0 If AdjGrossScore CoursePar + 3 Then HAdj = ((Application.Min(AdjGrossScore - CoursePar + 1, 58)) Mod 5) - 2 End If If AdjGrossScore CoursePar And AdjGrossScore <= CoursePar + 3 Then HAdj = AdjGrossScore - CoursePar - 3 End If 'Output final Callaway score Callaway = Application.Max(InitGross - 50, GrossScore - HAdj) End Function "Duncs" wrote in message ups.com... Bernie & Bob, Many thanks for getting back to me. Bernie, I bet you thought you'd heard the last of me ;) I've looked at the site that Bob got the information from, and everything seems fine. However, after discussing with a colleague of mine who was also after the s/s, it would appear that all is not well. The website uses a Gross Score, which forms the basis of all calculations. It then works out an Adjusted Gross Score, using the "Double Par" rule. This "Adjusted Gross Score", is then used to lookup the table to identify the number of adjustments. The total of these adjustments, is then subtracted from the "Gross Score". Using your s/s Bernie and the scores in example 2 on the websitge, I get a Calloway Score of 74. However, the example on the site shows a score of 80. I've looked at you code, and attempted to modify it, thinking it would be simple. RawScore = 0 GrossScore = 0 'New variable, as Integer 'Store the used scores from the first 16 holes for later use 'in adjusting the returned score For Hole = 1 To HoleScores.Cells.Count If Hole <= HoleScores.Cells.Count - 2 Then UsedScores(Hole) = Application.Min(HoleScores(Hole).Value, 2 * HolePars(Hole).Value) End If RawScore = RawScore + Application.Min(HoleScores(Hole).Value, 2 * HolePars(Hole).Value) GrossScore = GrossScore + HoleScores(Hole).Value Next Hole 'Callaway = RawScore Callaway = GrossScore However, it now gives me a score of 79, and not the 80 that I would expect. I'm guessing that there is more to it than that though. Perhaps you could assist me? Many thanks Duncs On 30 Jul, 16:13, Bob I wrote: That is correct as per the rules. See quote below. "The official scorer begins by applying "double-par" stroke control to Howard's card. This means that the score for each hole is compared to double the par for that hole. If any score exceeds double par, the score is downward-adjusted to double-par for that hole. Duncs wrote: Bernie I've been using the Callaway s/s that you supplied, and all seems to be well. However... I have the following scores / pars entered in the spreadsheet: Golfer 1 has the following scores: 5, 7, 9, 9, 5, 8, 8, 7, 8, 8, 6, 6, 8, 6, 6, 6, 9, 8 When I total these individually, I get a total of 129. When it gets totalled in the s/s, it shows a total of 125. The hole pars are = 5, 4, 4, 5, 3, 5, 4, 3, 4, 4, 3, 4, 5, 4, 3, 4, 5, 3 This gives a double par total of = 144 As you can see, the hole score is not greater than double the par, so the raw score should be calculated as 129 and not 125 as it is showing. Unless, under the Calloway Rules, the individaul hole scores are checked against their par score. If this is the case, for Hole 3 with a par of 4 but a hole score of 9, the hole would only show a score of 8. If this is replicated over all holes, this would indeed give a total score of 125. Can you help? Rgds Duncs- Hide quoted text - - Show quoted text -- Hide quoted text - - Show quoted text - |
#7
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Duncs,
It works, obviously! I wasn't so sure - but I'm glad to be of help. Bernie |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Bernie Deitrick | Excel Discussion (Misc queries) | |||
PING Bob Phillips | Excel Discussion (Misc queries) | |||
Bernie My New Macro | Excel Worksheet Functions | |||
My New Macro from Bernie | Excel Worksheet Functions | |||
Bernie Deitrick | Excel Worksheet Functions |