A simple addition breaks my formula and my brain!

Tomeegee

New Member
Joined
Mar 9, 2021
Messages
30
Office Version
  1. 365
Platform
  1. MacOS
MrExcel has saved me in the past my golf tourney scoring spreadsheet. It has worked well. However, as I changed a course name, some formulas that worked smoothly now give an error on just that course. The new course is "Sanctuary" in the top image. The bottom image shows how all other courses deliver the proper value. The formula is =INDEX(($B$9:$E$25,$B$28:$E$44,$B$47:$E$63,$B$66:$E$82),MATCH($B$3,$B$9:$B$25,0),IF($B5="Front",3,4),MATCH($I$3,$O$2:$O$6))
Screen Shot 2023-08-25 at 2.06.31 PM.png
Screen Shot 2023-08-25 at 2.06.15 PM.png

Maybe it's some dead simple? I've compared the formulas to the one used with the previous course, and nothing changed. Thanks in advance!
 

Attachments

  • Screen Shot 2023-08-25 at 2.01.30 PM.png
    Screen Shot 2023-08-25 at 2.01.30 PM.png
    194.2 KB · Views: 5
  • Screen Shot 2023-08-25 at 2.01.30 PM.png
    Screen Shot 2023-08-25 at 2.01.30 PM.png
    194.2 KB · Views: 5

Excel Facts

What is the shortcut key for Format Selection?
Ctrl+1 (the number one) will open the Format dialog for whatever is selected.
Some of the forum members (me, for one) would need to recreate your workbook. That is a lot of work.
Mr. Excel has a tool xl2bb add in (Link below) that allows you to post a mini workbook.

In addition to all the work, we could also make errors in your data (and assumptions).

Please help the forum help you, and post a mini workbook. If for some reason you can't the please post the data as a table and not an image.
 
Upvote 0
You need to specify an exact match for the 2nd match function as well as changing the range to start at O3
Excel Formula:
=INDEX(($B$9:$E$25,$B$28:$E$44,$B$47:$E$63,$B$66:$E$82),MATCH($B$3,$B$9:$B$25,0),IF($B5="Front",3,4),MATCH($I$3,$O$3:$O$6,0))
Although I'm not sure it's actually giving the correct results
 
Upvote 0
Solution
You need to specify an exact match for the 2nd match function as well as changing the range to start at O3
Excel Formula:
=INDEX(($B$9:$E$25,$B$28:$E$44,$B$47:$E$63,$B$66:$E$82),MATCH($B$3,$B$9:$B$25,0),IF($B5="Front",3,4),MATCH($I$3,$O$3:$O$6,0))
Although I'm not sure it's actually giving the correct results
It did indeed work on the page I sent. But when I brought the formula out to the worksheet where the scorecards are (S22_90):
=INDEX((S22_100!$B$9:$E$25,S22_100!$B$28:$E$44,S22_100!$B$47:$E$63,S22_100!$B$66:$E$82),MATCH(B3,S22_100!$B$9:$B$25,0),IF($B5="Front",3,4),MATCH($I3,S22_90!$O$2:$O$6,0))
I encountered the same problem.
problem formula.xlsx
ABCDEFGHIJKMOP
1
2PlayerHCPPlayerHcpCoursesSide
3Tom G9SanctuaryTom G19.8PineLakesFRONT
4Brian A19.7OleanderBACK
5FRONTJody B22.6IndianMound
6Wally B20Sanctuary
7Rich C13.3
8PlayerSideFrontBackPineLakesJoel C33.2
9Tom G2021Jim G14.6
10Brian A98Ray L25.9
11Jody B1010Jay M7.6
12Wally B98Mark M27.6
13Rich C56Ken R16.4
14Joel C1313Mike S22.3
15Jim G66Steven S15.7
16Ray L1010Rob T9.3
17Jay M43Dean V14.6
18Mark M1111Bruce W12.8
19Ken R77Course0
20Mike S88
21Steven S76
22Rob T43
23Dean V66
24Bruce W55
25Course00
26
27PlayerSideFrontBackOleander
28Tom G1518
29Brian A99
30Jody B1010
31Wally B999
32Rich C66
33Joel C1314
34Jim G67
35Ray L1010
36Jay M44
37Mark M1111
38Ken R77
39Mike S89
40Steven S77
41Rob T44
42Dean V67
43Bruce W56
44Course00
45
46PlayerSideFrontBackIndianMound
47Tom G511
48Brian A99
49Jody B1010
50Wally B99
51Rich C66
52Joel C1313
53Jim G66
54Ray L1010
55Jay M33
56Mark M1111
57Ken R77
58Mike S88
59Steven S77
60Rob T44
61Dean V66
62Bruce W55
63Course00
64
65PlayerSideFrontBackSanctuary
66Tom G917
67Brian A1010
68Jody B1111
69Wally B1010
70Rich C67
71Joel C1415
72Jim G77
73Ray L1112
74Jay M55
75Mark M1112
76Ken R88
77Mike S910
78Steven S78
79Rob T45
80Dean V77
81Bruce W66
82Course00
S22_90 (2)
Cell Formulas
RangeFormula
D3D3=INDEX(($B$9:$E$25,$B$28:$E$44,$B$47:$E$63,$B$66:$E$82),MATCH($B$3,$B$9:$B$25,0),IF($B5="Front",3,4),MATCH($I$3,$O$3:$O$6,0))
B8:B25,B65:B82,B46:B63,B27:B44B8=$J$2:$J$19
D9:E9D9='9 Hole Handicaps'!H6
D10:E10D10='9 Hole Handicaps'!H12
D11:E11D11='9 Hole Handicaps'!H18
D12:E12D12='9 Hole Handicaps'!H24
D13:E13D13='9 Hole Handicaps'!H30
D14:E14D14='9 Hole Handicaps'!H36
D15:E15D15='9 Hole Handicaps'!H42
D16:E16D16='9 Hole Handicaps'!H48
D17:E17D17='9 Hole Handicaps'!H54
D18:E18D18='9 Hole Handicaps'!H60
D19:E19D19='9 Hole Handicaps'!H66
D20:E20D20='9 Hole Handicaps'!H72
D21:E21D21='9 Hole Handicaps'!H78
D22:E22D22='9 Hole Handicaps'!H84
D23:E23D23='9 Hole Handicaps'!H90
D24:E24D24='9 Hole Handicaps'!H96
K3K3='9 Hole Handicaps'!B4
K4K4='9 Hole Handicaps'!B10
K5K5='9 Hole Handicaps'!B16
K6K6='9 Hole Handicaps'!B22
K7K7='9 Hole Handicaps'!B28
K8K8='9 Hole Handicaps'!B34
K9K9='9 Hole Handicaps'!B40
K10K10='9 Hole Handicaps'!B46
K11K11='9 Hole Handicaps'!B52
K12K12='9 Hole Handicaps'!B58
K13K13='9 Hole Handicaps'!B64
K14K14='9 Hole Handicaps'!B70
K15K15='9 Hole Handicaps'!B76
K16K16='9 Hole Handicaps'!B82
K17K17='9 Hole Handicaps'!B88
K18K18='9 Hole Handicaps'!B94
D28:E28D28='9 Hole Handicaps'!K6
D29:E29D29='9 Hole Handicaps'!K12
D30:E30D30='9 Hole Handicaps'!K18
D31:E31D31='9 Hole Handicaps'!K24
D32:E32D32='9 Hole Handicaps'!K30
D33:E33D33='9 Hole Handicaps'!K36
D34:E34D34='9 Hole Handicaps'!K42
D35:E35D35='9 Hole Handicaps'!K48
D36:E36D36='9 Hole Handicaps'!K54
D37:E37D37='9 Hole Handicaps'!K60
D38:E38D38='9 Hole Handicaps'!K66
D39:E39D39='9 Hole Handicaps'!K72
D40:E40D40='9 Hole Handicaps'!K78
D41:E41D41='9 Hole Handicaps'!K84
D42:E42D42='9 Hole Handicaps'!K90
D43:E43D43='9 Hole Handicaps'!K96
O31O31=INDEX(($B$9:$E$25,$B$28:$E$44,$B$47:$E$63,$B$66:$E$82),MATCH($B$3,$B$9:$B$25,0),IF($B5="Front",3,4),MATCH($I$3,$O$3:$O$6,0))
D47:E47D47='9 Hole Handicaps'!E6
D48:E48D48='9 Hole Handicaps'!E12
D49:E49D49='9 Hole Handicaps'!E18
D50:E50D50='9 Hole Handicaps'!E24
D51:E51D51='9 Hole Handicaps'!E30
D52:E52D52='9 Hole Handicaps'!E36
D53:E53D53='9 Hole Handicaps'!E42
D54:E54D54='9 Hole Handicaps'!E48
D55:E55D55='9 Hole Handicaps'!E54
D56:E56D56='9 Hole Handicaps'!E60
D57:E57D57='9 Hole Handicaps'!E66
D58:E58D58='9 Hole Handicaps'!E72
D59:E59D59='9 Hole Handicaps'!E78
D60:E60D60='9 Hole Handicaps'!E84
D61:E61D61='9 Hole Handicaps'!E90
D62:E62D62='9 Hole Handicaps'!E96
D66:E66D66='9 Hole Handicaps'!B6
D67:E67D67='9 Hole Handicaps'!B12
D68:E68D68='9 Hole Handicaps'!B18
D69:E69D69='9 Hole Handicaps'!B24
D70:E70D70='9 Hole Handicaps'!B30
D71:E71D71='9 Hole Handicaps'!B36
D72:E72D72='9 Hole Handicaps'!B42
D73:E73D73='9 Hole Handicaps'!B48
D74:E74D74='9 Hole Handicaps'!B54
D75:E75D75='9 Hole Handicaps'!B60
D76:E76D76='9 Hole Handicaps'!B66
D77:E77D77='9 Hole Handicaps'!B72
D78:E78D78='9 Hole Handicaps'!B78
D79:E79D79='9 Hole Handicaps'!B84
D80:E80D80='9 Hole Handicaps'!B90
D81:E81D81='9 Hole Handicaps'!B96
Dynamic array formulas.
Named Ranges
NameRefers ToCells
'S22_90 (2)'!Player='S22_90 (2)'!$J$3:$J$19B65, B46, B27, B8
Cells with Data Validation
CellAllowCriteria
O2:O6List=$O$2:$O$6
G8List=$O$2:$O$6
I3List=$O$2:$O$6
G46List=$O$2:$O$6
G27List=$O$2:$O$6
G65List=$O$2:$O$6
B5List=Side
I5List=Dates
B3List=Player
J2:J19List=Player
 
Last edited:
Upvote 0
You need to select the range that you want to copy before you click the mini-sheet button ;)
 
Upvote 0
You've changed the range in the last Match back to O2 rather than O3
 
Upvote 0
Some of the forum members (me, for one) would need to recreate your workbook. That is a lot of work.
Mr. Excel has a tool xl2bb add in (Link below) that allows you to post a mini workbook.

In addition to all the work, we could also make errors in your data (and assumptions).

Please help the forum help you, and post a mini workbook. If for some reason you can't the please post the data as a table and not an image.
Let me try Mini-sheet here

You need to select the range that you want to copy before you click the mini-sheet button ;)
Thanks. Rather clumsy with Xl2.
 
Upvote 0
You've changed the range in the last Match back to O2 rather than O3
Thanks much. I finally got it right and am able to use the formula throughout the doc.

I have one other page which doesn't prevent me from getting data from the page, but I can't understand why it's returning what it is. This page is set up to show values if a Player is a woman "Gina M" or just a "Player". I don't get why all courses return #NAME? in the "if with Player" row. The values that should be there do show up in other sections of my workbook. But here they do this. Also, if the course PineLakes is chosen, all the if With Gina M values become FALSE. Arrays are way above my pay grade at the moment, so figuring this one out has been burdensome.

problem formula.xlsx
ABCDEFGHIJKLMNOPQRSTUVW
1
2Player
3PlayerMGolf Course:PineLakes
4
5FRONT
6
7HOLE123456789Total
8Score Card Par54344354436
9Hole Handicap9131573171115
10
11123456789101112131415161718
12
13PineLakes543443544364544354343672
14Men's Handicap913157317111582101218416146
15Ladies Handicap371591713511118614101241682
16
17Oleander443545434364543453443672
18Men's Handicap135151371117910421612818146
19Ladies Handicap135151371117910421612818146
20
21IndianMound435443544365434443543672
22Men's Handicap111711371539541418612101628
23Ladies Handicap515113111739741418612101628
24
25Sanctuary445343454364443453543672
26Men's Handicap313151171795114610184121682
27Ladies Handicap171117591315314612188101624
28
29
30If with Player#NAME?#NAME?#NAME?#NAME?#NAME?#NAME?#NAME?#NAME?#NAME?{=IF(AND(B3=Player,$B5="FRONT",$I3="PineLakes"),$C$14:$K$14,IF(AND($B5="BACK",$I3="PineLakes"),$M$14:$U$14,IF(AND($B5="FRONT",$I3="Oleander"),$C$18:$K$18,IF(AND($B5="BACK",$I3="Oleander"),$M$18:$U$18,IF(AND($B5="FRONT",$I3="IndianMound"),$C$22:$K$22,IF(AND($B5="BACK",$I3="IndianMound"),$M$22:$U$22,IF(AND($B5="FRONT",$I3="Sanctuary"),$C$26:$K$26,IF(AND($B5="BACK",$I3="Sanctuary"),$M$26:$U$26))))))))}
31if With Gina MFALSEFALSEFALSEFALSEFALSEFALSEFALSEFALSEFALSE{=IF(AND(B3="Gina M",$B5="FRONT",$I3="PineLakes"),$C$15:$K$15,IF(AND($B5="BACK",$I3="PineLakes"),$M$15:$U$15,IF(AND($B5="FRONT",$I3="Oleander"),$C$19:$K$19,IF(AND($B5="BACK",$I3="Oleander"),$M$19:$U$19,IF(AND($B5="FRONT",$I3="IndianMound"),$C$23:$K$23,IF(AND($B5="BACK",$I3="IndianMound"),$M$23:$U$23,IF(AND($B5="FRONT",$I3="Sanctuary"),$C$27:$K$27,IF(AND($B5="BACK",$I3="Sanctuary"),$M$27:$U$27))))))))}
32
33Comparison9131573171115=@INDEX(INDIRECT($I$3),IF($C$3="M",2,3),IF($B$5="FRONT",COLUMN(B1),COLUMN(L1)))
34
ParHCPs
Cell Formulas
RangeFormula
C3C3=IF(B3="Gina M","F","M")
C7:K7C7=IF(B5="FRONT",C11:K11,IF(B5="BACK",M11:U11))
C8:K8C8=INDEX(INDIRECT($I$3),1,IF($B$5="FRONT",COLUMN(B1),COLUMN(L1)))
L8,V25,L25,V21,L21,V17,L17,V13,L13L8=SUM(C8:K8)
C9:K9C9=INDEX(INDIRECT($I$3),IF($C$3="M",2,3),IF($B$5="FRONT",COLUMN(B1),COLUMN(L1)))
W13,W25,W21,W17W13=SUM(L13+V13)
C30:K30C30=IF(AND(B3=Player,$B5="FRONT",$I3="PineLakes"),$C$14:$K$14,IF(AND($B5="BACK",$I3="PineLakes"),$M$14:$U$14,IF(AND($B5="FRONT",$I3="Oleander"),$C$18:$K$18,IF(AND($B5="BACK",$I3="Oleander"),$M$18:$U$18,IF(AND($B5="FRONT",$I3="IndianMound"),$C$22:$K$22,IF(AND($B5="BACK",$I3="IndianMound"),$M$22:$U$22,IF(AND($B5="FRONT",$I3="Sanctuary"),$C$26:$K$26,IF(AND($B5="BACK",$I3="Sanctuary"),$M$26:$U$26))))))))
C31:K31C31=IF(AND(B3="Gina M",$B5="FRONT",$I3="PineLakes"),$C$15:$K$15,IF(AND($B5="BACK",$I3="PineLakes"),$M$15:$U$15,IF(AND($B5="FRONT",$I3="Oleander"),$C$19:$K$19,IF(AND($B5="BACK",$I3="Oleander"),$M$19:$U$19,IF(AND($B5="FRONT",$I3="IndianMound"),$C$23:$K$23,IF(AND($B5="BACK",$I3="IndianMound"),$M$23:$U$23,IF(AND($B5="FRONT",$I3="Sanctuary"),$C$27:$K$27,IF(AND($B5="BACK",$I3="Sanctuary"),$M$27:$U$27))))))))
M30:M31,M33M30=FORMULATEXT(C30)
C33:K33C33=INDEX(INDIRECT($I$3),IF($C$3="M",2,3),IF($B$5="FRONT",COLUMN(B1),COLUMN(L1)))
Press CTRL+SHIFT+ENTER to enter array formulas.
Dynamic array formulas.
Cells with Data Validation
CellAllowCriteria
B3List=S22_90!$J$2:$J$19
B5List=Side
B13List=S22_90!$O$2:$O$6
B17List=S22_90!$O$2:$O$6
B21List=S22_90!$O$2:$O$6
B25List=S22_90!$O$2:$O$6
I3List=S22_90!$O$2:$O$6
 
Upvote 0
As this is a totally different question it needs a new thread. Thanks
 
Upvote 0

Forum statistics

Threads
1,215,079
Messages
6,122,998
Members
449,092
Latest member
masterms

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