Golf Handicap Formula help

Gulfcourse

New Member
Joined
Nov 5, 2023
Messages
27
Office Version
  1. 365
Platform
  1. Windows
I took over the league this year and was given a CD for a golf program that worked with Windows Caveman so I decided to create my own since it is such a small league of old guys!
To establish a handicap for this season I manually enterd 5 scores in Columns I through N, in every row, to get a handicap to reflect the one they finished with last season.
I have been entering their scores twice a week since April and am currently in Column BB.
Not everyone plays every time so there are gaps in some players rows.

I have had a working formula to take the last 5 scores to establish the golfers handicap but it has gone wonky on me.
The formula listed below is in column CA5 through CA28.
The number from Column CA is returned to the corresponding player in Column D and then the other simple formulas, in Columns D, E, & F kick in to figure the handicap.
The problem is the totals in Column CA were no longer consistent, some were only totaling up the last 4 scores instead of 5.
The original formula is:
=IFERROR(SUM(OFFSET($H10,0,LARGE(IF(I10:BY10<>"",COLUMN(I10:BY10))-8,$BZ$3),1,(45-LARGE(IF(I10:BY10<>"",COLUMN(I10:BY10))-8,$BZ$3)))),"NOT ENOUGH")

but for some rows it is only counting the last 4 and I've had to go to those rows and change the -8's in the formula to 9's or 10's to get 5 scores and I have no idea why.

The players are in the rows and the course scores are in the columns.
I have a drop down to pick a value in BZ3 and leave it at 5, this enables me to change the number of scores I want to use but I have not changed it from 5.

Some folks have more rounds than others but I don't think that's the problem since, for example, Petro was correct in CA22 and one row down Roderick CA23 was incorrect until I changed Roderick's 8's to 9's.
The formula (the original) in for Petro that returns 5 is
=IFERROR(SUM(OFFSET($H22,0,LARGE(IF(I22:BY22<>"",COLUMN(I22:BY22))-8,$BZ$3),1,(45-LARGE(IF(I22:BY22<>"",COLUMN(I22:BY22))-8,$BZ$3)))),"NOT ENOUGH")


The formula I had to change to get 5 scores for Roderick is:
=IFERROR(SUM(OFFSET($H23,0,LARGE(IF(I23:BY23<>"",COLUMN(I23:BY23))-9,$BZ$3),1,(45-LARGE(IF(I23:BY23<>"",COLUMN(I23:BY23))-9,$BZ$3)))),"NOT ENOUGH")


I don't want to have to constanly change the formulas so any suggestions would be greatly appreciated!
 

Attachments

  • ScreenshotGolf1.jpg
    ScreenshotGolf1.jpg
    140.5 KB · Views: 2
  • ScreenshotGolf2.jpg
    ScreenshotGolf2.jpg
    157.1 KB · Views: 2

Excel Facts

Wildcard in VLOOKUP
Use =VLOOKUP("Apple*" to find apple, Apple, or applesauce
Unfortunately we cannot copy from your image to test but see if the formula below, which also avoids the volatile function OFFSET, is any use for summing the last 5.

For the future, have a look at XL2BB for providing sample data that we can easily use.

24 08 08.xlsm
EFGHIJKLMNOPQRSTUVWXYZ
1Sum Last 5
2426811108378701059672769979931047476
347392897889107941107410788
4NOT ENOUGH7784
54121051087577877697
6NOT ENOUGH
Last 5
Cell Formulas
RangeFormula
E2:E6E2=LET(f,TAKE(FILTER(F2:Z2,F2:Z2>0),,-5),IF(COUNT(f)=5,SUM(f),"NOT ENOUGH"))
 
Upvote 0
Test_Golf_file.xlsx
BCDEFGHIJKLMNOPQRSTUVWXYZAAABACADAEAFAGAHAIAJAKALAMANAOAPAQARASATAUAVAWAXAYAZBABCBDBEBFBGBHBIBJBKBLBMBNBOBPBQBRBSBTBUBVBWBXBYBZCACBCC
3LASTHNCPTOTALAVGPARDIV BYROUNDSMANMANMANMANMANMANSCORESCORESCORESCORESCORESCORE4/94/164/184/234/254/305/25/75/95/145/165/215/235/285/306/46/66/116/136/186/206/256/277/27/47/97/117/167/187/237/257/308/18/88/138/158/208/228/278/299/39/59/109/129/179/199/249/2610/110/310/810/1010/1510/1710/2210/285
4LASTHNCPTOTALAVGPARDIV BYROUNDSMANMANMANMANMANMANRidgetopCoppertopSpringVEcho VEls MeadIronwoodBunkerBrookledgeSenecaSpringvaleCosset CreekPine HillsGrantwoodCoppertopGood ParkBunker HillEagle CreekValleaireLoyal OakGrey HawkRidge TopRoyal CrestFox DenBriarwoodThunderbird SouthChenowethPine BrookSpring HillsRoses RunRaintreeNO PLAYPleasant ValleyEcho ValleyChippewaTurkeyfootRawigaRacoon HillWillow CreekThe PinesCosset CreekWindmill LakesRidgewoodMayfairTanglewoodPine HillsChenowethForest HillsParadise LakeCoppertopSugarbushIndian HollowLegends of MassilonFox CreekRicelandSpring HillsElsworth MeadowsShould be
5Bonham-15.226553725119884848484849283848886918582988884265Bonham437
6Cox8.241182.27256787779818580818087858376411Cox411
7Dangerfield-16.625651.2725268990919193928282979492948788979995889393949088989594898588839387256Dangerfield436
8Davis21.149298.472511021041051021019985492Davis511
9Edmisten-16.82555172530878787858485908586848486839286918289878583918789968784898693898287869281255Edminson428
10Frederick-17.6250507251383838484848492878979878688789177828584250Frederick419
11Funari11.2430867253848483828384918686430Funari430
12Gosnell18.44759572539495919395919591103475Gosnell475
13Gressell-17.425150.2725238985868584859587849495858893858890968284889187948479888692251Gressell429
14Hobbs-15.026653.272530848485858485779086869286879185869479928379949287828194929095939184918784266Hobbs437
15Keep-16.8255517253487878690898791858886899491869290888580919594859092878690839085939391919183818884255Keep427
16Kilroy-19.523847.6725268484858584858081888684889491898583868388948385899288948079798376238Kilroy397
17Lincoln-12.028557725259510010099100989898979910490999895899495919391969787979010191939287285Lincoln464
18Moderick18.44759572529696949496959595475Moderick475
19Nassar-11.2290587253392929292929294859295100969698929596959897939898899610297989489999598969499979491290Nassar475
20Nigro1.63707472527848484838382888682829595879693888891879389849195909199979694948688370Nigro458
21Paladino13.444488.872528686868786868798444Paladino444
22Petro1.937274.47252890909090908992909087879587968697989398969087939995918497939688949487372Petro459
23Roderick-19.523847.6725387979797979788174748182817578807874837775788179828186757678758185738175817778748177807877238Roderick393
24Sepic-14.227154.2725368585868588858982858690858691948487100849390859384839187748688858789888792878890938990271Sepic450
25Smigel50959595959595475Smigel475
26Theberge-19.523847.67252277777777757480838882829080788380797581838484808076828077238Theberge395
27Wallon-16.525751.47252886868685868687858185839191978982889095948888848686769882908289869084257Wallon431
28Zeman-13.927354.67252992929091909110091101859891919089879496949592949591829794103971008988969188273Zeman452
HANDICAP
Cell Formulas
RangeFormula
Z3,AB3,AD3,AF3,AH3,AJ3,AL3,AN3,AP3,AR3,AT3,AV3,AX3,AZ3,BD3,BF3,BH3,BJ3,BL3,BN3,BP3,BR3,BT3,BV3,BX3Z3=SUM(X3+7)
AA3,AC3,AE3,AG3,AI3,AK3,AM3,AO3,AQ3,AS3,AU3,AW3,AY3,BA3,BC3,BE3,BG3,BI3,BK3,BM3,BO3,BQ3,BS3,BU3,BW3AA3=Y3+7
C5:C24,C26:C28C5=SUM(E5-F5)*0.8
D5:D24,D26:D28D5=SUM(CA5)
E5:E24,E26:E28E5=SUM(D5/G5)
H5:H28H5=COUNT(O5:BC5)
CA5:CA28CA5=IFERROR(SUM(OFFSET($H5,0,LARGE(IF(I5:BY5<>"",COLUMN(I5:BY5))-8,$BZ$3),1,(45-LARGE(IF(I5:BY5<>"",COLUMN(I5:BY5))-8,$BZ$3)))),"NOT ENOUGH")
Cells with Data Validation
CellAllowCriteria
BZ3List4,5,6,7,8,9,10,11,12,13,14,15
BZ4List5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44
CA4List=$A$5:$A$17
 
Upvote 0
I wasn't quite sre what to do with the formula provided above and figured out how to use the xl2bb.
I've added what the totals should be in Column CC.

Thank you
 
Upvote 0
I don't understand some of the 'Should be' values but see if this helps. I have included two options (columns CC and CD).

24 08 08.xlsm
NOPQRSTUVWXYZAAABACADAEAFAGAHAIAJAKALAMANAOAPAQARASATAUAVAWAXAYAZBABBBCBDBXBYBZCACBCCCDCE
3MANSCORESCORESCORESCORESCORESCORE45391453984540045405454074541245414454194542145426454284543345435454404544245447454494545445456454614546345468454704547545477454824548445489454914549645498455034550545512777455935
4MANRidgetopCoppertopSpringVEcho VEls MeadIronwoodBunkerBrookledgeSenecaSpringvaleCosset CreekPine HillsGrantwoodCoppertopGood ParkBunker HillEagle CreekValleaireLoyal OakGrey HawkRidge TopRoyal CrestFox DenBriarwoodThunderbird SouthChenowethPine BrookSpring HillsRoses RunRaintreeNO PLAYPleasant ValleyEcho ValleyChippewaTurkeyfootRawigaRacoon HillWillow CreekThe PinesCosset CreekWindmill LakesShould be
5849283848886918582988884265Bonham437437437
680818087858376411Cox411411411
7928282979492948788979995889393949088989594898588839387256Dangerfield436436436
89985492DavisNOT ENOUGHNOT ENOUGH511
985908586848486839286918289878583918789968784898693898287869281255Edminson428428428
108492878979878688789177828584250Frederick419419419
1184918686430FunariNOT ENOUGHNOT ENOUGH430
12919591103475GosnellNOT ENOUGHNOT ENOUGH475
13859587849495858893858890968284889187948479888692251Gressell429429429
1485779086869286879185869479928379949287828194929095939184918784266Hobbs437437437
158791858886899491869290888580919594859092878690839085939391919183818884255Keep427427427
16858081888684889491898583868388948385899288948079798376238Kilroy397397397
17989898979910490999895899495919391969787979010191939287285Lincoln464464464
18959595475ModerickNOT ENOUGHNOT ENOUGH475
199294859295100969698929596959897939898899610297989489999598969499979491290Nassar475475475
2082888682829595879693888891879389849195909199979694948688370Nigro458458458
21868798444PaladinoNOT ENOUGHNOT ENOUGH444
228992909087879587968697989398969087939995918497939688949487372Petro459459459
23788174748182817578807874837775788179828186757678758185738175817778748177807877238Roderick393393393
24858982858690858691948487100849390859384839187748688858789888792878890938990271Sepic450450450
2595475SmigelNOT ENOUGHNOT ENOUGH475
267480838882829080788380797581838484808076828077238Theberge395395395
278687858185839191978982889095948888848686769882908289869084257Wallon431431431
289110091101859891919089879496949592949591829794103971008988969188273Zeman452452452
Golf
Cell Formulas
RangeFormula
Z3,AB3,AD3,AF3,AH3,AJ3,AL3,AN3,AP3,AR3,AT3,AV3,AX3,AZ3,BD3,BX3Z3=SUM(X3+7)
AA3,AC3,AE3,AG3,AI3,AK3,AM3,AO3,AQ3,AS3,AU3,AW3,AY3,BA3,BC3AA3=Y3+7
CC5:CC28CC5=LET(f,TAKE(FILTER(O5:BY5,O5:BY5>0),,-BZ$3),IF(COUNT(f)=BZ$3,SUM(f),"NOT ENOUGH"))
CD5:CD28CD5=LET(f,TAKE(TOROW(O5:BY5,1),,-BZ$3),IF(COUNT(f)=BZ$3,SUM(f),"NOT ENOUGH"))
CA5:CA28CA5=IFERROR(SUM(OFFSET($H5,0,LARGE(IF(I5:BY5<>"",COLUMN(I5:BY5))-8,$BZ$3),1,(45-LARGE(IF(I5:BY5<>"",COLUMN(I5:BY5))-8,$BZ$3)))),"NOT ENOUGH")
 
Upvote 0
Thank you very much Peter, I really appreciate your help but am still having a problem. I want the range to start at the I column so I changed the formula to:
=LET(f,TAKE(FILTER(I5:BY5,I5:BY5>0),,-BZ$3),IF(COUNT(f)=BZ$3,SUM(f),"NOT ENOUGH"))
and pasted it into CD5 and it's returning "NOT ENOUGH"
I see your formula got the correct totals, since they are the same as the should be values, which I added by manually adding the last 5 scores.
I just tried pasting both your formulas into CD5 and got the same Not Enough message???
 
Upvote 0
I see your formula got the correct totals,
Since you don't get the correct results with the same formula it suggests that our data is different.
Perhaps your 'blank' cells are not actually completely empty?
In your post #3 mini sheet cell BY5 appears blank. What happens if you put this formula in an empty cell somewhere?
Excel Formula:
=ISTEXT(BY5)

Another thing that could be happening is that your scores are Text values and not actual Numbers? What happens in the post #3 mini sheet if you put this formula in an empty cell somewhere (noting that cell BC5 appears to contain the Number 84)?
Excel Formula:
=ISNUMBER(BC5)

As an alternative to my previous formula, what happens if you put this formula in CD5?
Excel Formula:
=LET(f,TAKE(FILTER(I5:BY5,I5:BY5<>""),,-BZ$3),IF(COUNT(f)=BZ$3,SUM(f),"NOT ENOUGH"))
 
Upvote 0
Solution
=LET(f,TAKE(FILTER(I5:BY5,I5:BY5<>""),,-BZ$3),IF(COUNT(f)=BZ$3,SUM(f),"NOT ENOUGH"))
The formula above worked and I am so thankful to you. It is much appreciated since I know enough Excel to be dangerous, but not enough to figure out what the problem was!
 
Upvote 0
You're welcome. Glad it worked for you. Thanks for the confirmation.

I would still be interested to know the results of those two short formulas from my last post so I might understand why the earlier one did not work. :)
 
Upvote 0
Hello Peter,

I put =ISTEXT(BY5) in and it returned 0.
I changed it to BG10 and got the circular reference message, hit OK and it returned 0. I changed it and pasted it into a few other cells and they returned 0 without the CR message.
I did the same with =ISNUMBER(BC5) in BC5, I did not clear the score out before pasting it in and got a circular reference message, clicked on okay and the cell was 0.
I changed BC5 to BD9, pasted in into that cell and the same thing, circular reference warning, click OK and the cell returned 0.
Before I change BC5 to BD9 I pasted =ISNUMBER(BC5) into BD9 and it returned TRUE.

I hope this helps explain the error in my ways to you, and you may be able to further educate me, since I have no idea why the cells were doing that.
THANK YOU once again!

Steve
 
Upvote 0

Forum statistics

Threads
1,221,230
Messages
6,158,667
Members
451,507
Latest member
aexis48d

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top