Microsoft Excel Formula needed

I would like to have some help with another formula in the attached excel file.  The areas highlighted in orange are the instructions for value distribution and the areas highlighted in yellow are where I would like the formulas to calculate what those headings/lables indicate.

Thank you in advance for your assistance.
ExpertsExchangeSkinsPOINTSbonus.xlsx
golfouting_commishAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Ingeborg Hawighorst (Microsoft MVP / EE MVE)Microsoft MVP ExcelCommented:
Hello,

what is a skin and how do you determine if somebody has won a skin? Please understand that not everybody may be informed about the terminology you are using.

Can you explain this in general terms?

cheers, teylyn
0
golfouting_commishAuthor Commented:
lowest score on a hole without any ties.  Sorry, I should have added that the cells that are highlighted in RED are winning skins in GROSS SCORE.  The cells highlighted in PINK are winning skins of NET SCORE.  

I want column A to automatically calculate the SKINS POINTS BONUS using the chart located in AG14:AH32.
0
Nick67Commented:
OK, I did it with VBA for the Bonus Points.

The lower stuff was just ifs and sums

Open the code window, or get a macro hotkey working to recalculate as necessary.
The keyboard shortcut is grumpy in the upload

Let me know if you need it tweaked
Option Explicit
Sub Calculate()
'
' Calculate Macro
'
' Keyboard Shortcut: Ctrl+c
'
    Call CalculateBonuses
End Sub

Private Sub CalculateBonuses()
Dim x As Integer

For x = 16 To 47
    Select Case CalculateGrossBonus(x)
        Case 0
            ActiveWorkbook.ActiveSheet.Cells(x, 1).Value = 0
        Case 1
            ActiveWorkbook.ActiveSheet.Cells(x, 1).Value = 3
        Case 2
            ActiveWorkbook.ActiveSheet.Cells(x, 1).Value = 5
        Case Else
            ActiveWorkbook.ActiveSheet.Cells(x, 1).Value = 10
    End Select
    x = x + 1
    Select Case CalculateNetBonus(x)
        Case 0
            ActiveWorkbook.ActiveSheet.Cells(x, 1).Value = 0
        Case 1
            ActiveWorkbook.ActiveSheet.Cells(x, 1).Value = 3
        Case 2
            ActiveWorkbook.ActiveSheet.Cells(x, 1).Value = 5
        Case Else
            ActiveWorkbook.ActiveSheet.Cells(x, 1).Value = 10
    End Select
Next x

End Sub

Public Function CalculateGrossBonus(Row As Integer)
Dim x As Integer
Dim GrossSkinCount As Integer


'for all 18 holes, we have to see if the player one a gross skin
'or a net skin, total up the skins and award bonus points

For x = 5 To 23
    If Cells(50, x).Value = 1 Then
        If Cells(Row, x).Value = Cells(48, x).Value Then
            GrossSkinCount = GrossSkinCount + 1
        End If
    End If
Next x

CalculateGrossBonus = GrossSkinCount

End Function

Public Function CalculateNetBonus(Row As Integer)
Dim x As Integer
Dim NetSkinCount As Integer

'for all 18 holes, we have to see if the player one a gross skin
'or a net skin, total up the skins and award bonus points

For x = 5 To 23
    If Cells(51, x).Value = 1 Then
        If Cells(Row, x).Value = Cells(49, x).Value Then
            NetSkinCount = NetSkinCount + 1
        End If
    End If
Next x
CalculateNetBonus = NetSkinCount

End Function

Open in new window

ExpertsExchangeSkinsPOINTSbonus.xlsm
0
Python 3 Fundamentals

This course will teach participants about installing and configuring Python, syntax, importing, statements, types, strings, booleans, files, lists, tuples, comprehensions, functions, and classes.

golfouting_commishAuthor Commented:
What is VBA and where is the formula located
0
barry houdiniCommented:
If you want a formula solution then that requires a complex formula so you might be better off with Nick67's solution......but in any case you can use this "array formula" in A16

=IFERROR(LOOKUP(SUM((MMULT(TRANSPOSE(IF(C16="Net Score",C$16:C$47="Net Score",C$16:C$47<>"Net Score")*(E$16:V$47<=E16:V16)),ROW(C$16:C$47)^0)=1)+0),AG$15:AH$32),0)

confirmed with CTRL+SHIFT+ENTER and copied down

see attached, regards, barry
26946492.xlsx
0
golfouting_commishAuthor Commented:
Almost exactly what I need. Column A only needs one value not two.  The "Skins POINT Bonus" is awarded for the total number of skins won from both the GROSS Score skins (Highlighted in RED) and the NET Score skins (highlighted in PINK).  For example, Player Derek Beers should be awarded a total of only 3 in column A for winning a total of one skin, where as player Joe Began should be awarded a total of 10 in column A because he won a total of 3 or more total skins.
ExpertsExchangeSkinsPOINTSbonus.xlsx
0
barry houdiniCommented:
OK, I changed to this formula in A16 copied down

=IF(C16="Net Score","",IFERROR(LOOKUP(SUM((MMULT(TRANSPOSE((C$16:C$47<>"Net Score")*(E$16:V$47<=E16:V16)),ROW(C$16:C$47)^0)=1)+(MMULT(TRANSPOSE((C$16:C$47="Net Score")*(E$16:V$47<=E17:V17)),ROW(C$16:C$47)^0)=1)),AG$15:AH$32),0))

That will put the score on the first row and leave the next blank, see attached

regards, barry
26946492v2.xlsx
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Nick67Commented:
VBA is the code language of macros.
You can find it on the developer tab of the Ribbon--providing that is turned on.
You can go to the Back Stage options to turn it on, if it isn't
Glad @barryhoudini got it cased for you with an array formula.
I figured there'd be a way to do it with array formulas, but they are a bear to debug, hard to decipher, and perform poorly when large numbers of cells are involved, so they aren't something I play with a lot.
Good job, though :)

The following code would have given you the result you were looking for, as far as one value in Column A, and Bonuses being calculated on both kinds of skins
Option Explicit
Sub Calculate()
'
' Calculate Macro
'
' Keyboard Shortcut: Ctrl+c
'
    Call CalculateBonuses
End Sub

Private Sub CalculateBonuses()
Dim x As Integer
dim FinalBonusCount as Integer
FinalBonusCount = CalculateGrossBonus(x) + Select Case CalculateNetBonus(x+ 1)

For x = 16 To 47
    Select Case FinalBonusCount
        Case 0
            ActiveWorkbook.ActiveSheet.Cells(x, 1).Value = 0
        Case 1
            ActiveWorkbook.ActiveSheet.Cells(x, 1).Value = 3
        Case 2
            ActiveWorkbook.ActiveSheet.Cells(x, 1).Value = 5
        Case Else
            ActiveWorkbook.ActiveSheet.Cells(x, 1).Value = 10
    End Select
    x = x + 1
Next x

End Sub

Public Function CalculateGrossBonus(Row As Integer)
Dim x As Integer
Dim GrossSkinCount As Integer


'for all 18 holes, we have to see if the player one a gross skin
'or a net skin, total up the skins and award bonus points

For x = 5 To 23
    If Cells(50, x).Value = 1 Then
        If Cells(Row, x).Value = Cells(48, x).Value Then
            GrossSkinCount = GrossSkinCount + 1
        End If
    End If
Next x

CalculateGrossBonus = GrossSkinCount

End Function

Public Function CalculateNetBonus(Row As Integer)
Dim x As Integer
Dim NetSkinCount As Integer

'for all 18 holes, we have to see if the player one a gross skin
'or a net skin, total up the skins and award bonus points

For x = 5 To 23
    If Cells(51, x).Value = 1 Then
        If Cells(Row, x).Value = Cells(49, x).Value Then
            NetSkinCount = NetSkinCount + 1
        End If
    End If
Next x
CalculateNetBonus = NetSkinCount

End Function

Open in new window

0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Excel

From novice to tech pro — start learning today.