INDEX MATCH with COUNTIF?

Tomeegee

New Member
Joined
Mar 9, 2021
Messages
30
Office Version
  1. 365
Platform
  1. MacOS
What I'm trying to do is combine INDEX and MATCH along with COUNTIF and not having an easy time of it.

In the full worksheet, Column B extends down 16 players. For each players performance, I want a formula that will Count the number of Eagles, Birdies, and Albratrosses achieved either "naturally" or "with handicap." You can see the values for those in P3:Q13. There's a basic COUNTIF formula currently in O6:T:6. You can see Player 6 scored 2 birdies with handicap, 1 eagle with handicap, and 1 albatross with handicap.

What I want to do is use an INDEX MATCH with the COUNTIF to match O3 to Column B, and then COUNTIF 13 rows below the name (Eagles, Birdies). So I can change Player 6 to Player 3 and the COUNTIF we deliver results from Row 33 and so on and so forth.

I've included a formula I was trying to use =INDEX(B1:B324,MATCH(O3,$B$1:$B$324,0)+13,COUNTIF($C1:$K322,Q11)) with no successs. How far off am I?
 

Excel Facts

Can Excel fill bagel flavors?
You can teach Excel a new custom list. Type the list in cells, File, Options, Advanced, Edit Custom Lists, Import, OK
Can you post some sample data.

MrExcel has a tool called “XL2BB” that lets you post samples of your data that will allow us to copy/paste it to our Excel spreadsheets, so we can work with the same copy of data that you are. Instructions on using this tool can be found here: XL2BB Add-in

Note that there is also a "Test Here” forum on this board. This is a place where you can test using this tool (or any other posting techniques that you want to test) before trying to use those tools in your actual posts.
 
Upvote 0
Can you post some sample data.

MrExcel has a tool called “XL2BB” that lets you post samples of your data that will allow us to copy/paste it to our Excel spreadsheets, so we can work with the same copy of data that you are. Instructions on using this tool can be found here: XL2BB Add-in

Note that there is also a "Test Here” forum on this board. This is a place where you can test using this tool (or any other posting techniques that you want to test) before trying to use those tools in your actual posts.
Book2.xlsx
ABCDEFGHIJKLMNOPQRSTU
1
2
3Player 6Player 6=COUNTIF($C16:$K16,Q11)
4
5HBHEHANBNENA
6211000
7HOLE123456789Total
8Score Card Par54344354436
9Hole Handicap9131573171115NaturalWith Hcp
10Personal PAR54344354436Junk Points
11Score44546437542Birdie53
12Net over/Under-102021-231Eagle127
13Albatross2515
14Strokes V Course65455365544
15Net over/Under-2-11-111-320
16Eagle, Birdies7331528
17(formula pasted for demo purposes
18#REF!
19
20Player 3
21
22
23
24HOLE123456789Total
25Score Card Par54344354436
26Hole Handicap9131573171115
27Personal PAR (strokes)54344354436
28Score64746756449
29Net over/Under104024020
30
31Strokes V Course54345364539
32Net over/Under104014-12-1
33Eagle, Birdies336
34
35
36
37
Sheet1
Cell Formulas
RangeFormula
O6O6=COUNTIF($C16:$K16,Q11)
P6P6=COUNTIF($C16:$K16,Q12)
Q6Q6=COUNTIF($C16:$K16,Q13)
R6R6=COUNTIF($C16:$K16,P11)
S6S6=COUNTIF($C16:$K16,P12)
T6T6=COUNTIF($C16:$K16,P13)
O18O18=INDEX(B1:B324,MATCH(O3,$B$1:$B$324,0)+13,COUNTIF($C1:$K322,Q11))
B20B20='/Users/tomgoosmann/Documents/Personal/Golf Trips/Jekyll/Jekyll 2022/[Jekyll 2022 Scoring.xlsx]Tournment Matches '!C8
Cells with Conditional Formatting
CellConditionCell FormatStop If True
C16:K16,C33:K33Cell Valuecontains "FALSE"textNO
 
Upvote 0
Hope that worked! Thanks for checking it out. Help means a lot.
 
Upvote 0
Thanks for that, how about
Excel Formula:
=COUNTIFS(INDEX($C$1:$K$324,MATCH(O3,$B$1:$B$324,0)+13,0),Q11)
 
Upvote 0
Solution
Thanks for that, how about
Excel Formula:
=COUNTIFS(INDEX($C$1:$K$324,MATCH(O3,$B$1:$B$324,0)+13,0),Q11)
Like a charm! Now to take it apart and learn from it! Looks like I had all the pieces parts but as usual not using them in proper order. Thank you thank you for taking the time!
 
Upvote 0
You're welcome & thanks for the feedback.
 
Upvote 0
Hello again Fluff! I am unsure what I've messed up. The above formula you solved for me has been giving me a #REF error and I can't deconstruct what I've done.

I've put together a sample file stripped down to just what the formula needs to do. XL2BB doesn't seem to carry over comments, so I'll explain:

On Scorecard I want INDEX Column B to MATCH the name on sheet "Tally"
On Scorecard I want to COUNTIF and matching criteria from S22 in Columns C:K. +13 lines down from the matched name.
Tally is where the formula I'm looking to fix goes (see screenshot).
S22 is where the Criteria to match and count is.

Make sense?

Screen Shot 2022-08-31 at 6.05.08 PM.png



INDEX - MATCH - COUNTIF.xlsx
ABCDEFGHIJKLM
1
2Player
3Jay M
4
5FRONT
6
7HOLE123456789Total
8Score Card Par43544354436
9Hole Handicap1117113715395
10Personal PAR43544354436
11Score44546437542
12Net over/Under010021-231
13
14Strokes V Course43644364539
15Net over/Under01-1021-330
16Eagle, Birdies31518
17Sandie
18Chippie
19
20
21Player
22Jim G
23
24FRONT
25
26HOLE123456789Total
27Score Card Par43544354436
28Hole Handicap1117113715395
29Personal PAR (strokes)43645364540
30Score64746756449
31Net over/Under211014-12-1
32
33Strokes V Course53655365543
34Net over/Under111-114-11-1
35Eagle, Birdies3339
36
37
38
39
40Player
41Rob T
42
43FRONT
44
45HOLE123456789Total
46Score Card Par43544354436
47Hole Handicap1117113715395
48Personal PAR43544354436
49Score55547749450
50Net over/Under120034-150
51
52Strokes V Course43645365541
53Net over/Under12-1024-24-1
54Eagle, Birdies37313
55Sandie
56Chippie
57
58
59Player
60Mike S
61
62FRONT
63
64HOLE123456789Total
65Score Card Par43544354436
66Hole Handicap1117113715395
67Personal PAR (strokes)43645364540
68Score85688677459
69Net over/Under42043313-1
70
71Strokes V Course54655465545
72Net over/Under31033212-1
73Eagle, Birdies33
74Sandie
75Chippie
76
77
78Player
79Brian A
80
81FRONT
82
83HOLE123456789Total
84Score Card Par43544354436
85Hole Handicap1117113715395
86Personal PAR43544354436
87Score53847566549
88Net over/Under103032121
89
90Strokes V Course54755465546
91Net over/Under0-11-121010
92Eagle, Birdies336
93Sandie
94Chippie
95
96
97Player
98Ray L
99
100FRONT
101
102HOLE123456789Total
103Score Card Par43544354436
104Hole Handicap1117113715395
105Personal PAR (strokes)43645364540
106Score838669310558
107Net over/Under402216-360
108
109Strokes V Course54756476650
110Net over/Under3-11105-44-1
111Eagle, Birdies336
112Sandie
113Chippie
114
115
116Player
117Dean V
118
119FRONT
120
121HOLE123456789Total
122Score Card Par43544354436
123Hole Handicap1117113715395
124Personal PAR43544354436
125Score649666610558
126Net over/Under214223161
127
128Strokes V Course53655365543
129Net over/Under113113050
130Eagle, Birdies0
131Sandie
132Chippie
133
134
135Player
136Ken R
137
138FRONT
139
140HOLE123456789Total
141Score Card Par43544354436
142Hole Handicap1117113715395
143Personal PAR (strokes)43644354437
144Score74796838355
145Net over/Under311525-24-1
146
147Strokes V Course53655465544
148Net over/Under211414-33-2
149Eagle, Birdies15722
150Sandie
151Chippie
152
153
154
155
156
Scorecard
Cells with Conditional Formatting
CellConditionCell FormatStop If True
C149:K149Cell Valuecontains "FALSE"textNO
C130:K130Cell Valuecontains "FALSE"textNO
C111:K111Cell Valuecontains "FALSE"textNO
C92:K92Cell Valuecontains "FALSE"textNO
C73:K73Cell Valuecontains "FALSE"textNO
C54:K54Cell Valuecontains "FALSE"textNO
C16:K16,C35:K35Cell Valuecontains "FALSE"textNO


and this

INDEX - MATCH - COUNTIF.xlsx
ABCDEFGHIJKLMNOPQRSTU
1Column1Column2Front/BackHBHEHANBNENA
2Ken RIndianMoundFRONT
3IndianMoundBACK
4SkinsOleanderFRONT
5KingPrinceFRONT
6KingPrinceBACK
7OleanderFRONT
8OleanderBACK
9SkinsPineLakesBACK
10PineLakesFRONT
11PineLakesBACK
12
13Totals000000
14
15=INDEX('Scorecard'!B1:B324,MATCH(A2,'Scorecard'!$B$1:$B$324,0)+13,COUNTIF('Scorecard'!$C1:$K322,'S22'!C3))
16Jim GIndianMoundFRONT
17IndianMoundBACK
18SkinsOleanderFRONT
19KingPrinceFRONT
20KingPrinceBACK
21OleanderFRONT
22OleanderBACK
23SkinsPineLakesBACK
24PineLakesFRONT
25PineLakesBACK
26
27Totals000000
28
29Ray LIndianMoundFRONT
30IndianMoundBACK
31SkinsOleanderFRONT
32KingPrinceFRONT
33KingPrinceBACK
34OleanderFRONT
35OleanderBACK
36SkinsPineLakesBACK
37PineLakesFRONT
38PineLakesBACK
39
40Totals000000
Tally


and this

INDEX - MATCH - COUNTIF.xlsx
ABCDEF
1Natural (N)Handicap (H)
2Score
3Birdie (B)53
4Eagle (E)127
5Albatross (A)2515
6
7
8
9
10
11
12
13
14
15
16
S22
 
Upvote 0
The formula you have shown is not the same as the formula I posted.
 
Upvote 0
I'm searching desperately for the "I'm such a dope" emoji. When you said that I went "back to base camp to look for a map" and saw I wasn't working with the last formula you provided. Thanks for taking the time and setting me straight!
 
Upvote 0

Forum statistics

Threads
1,214,990
Messages
6,122,625
Members
449,093
Latest member
catterz66

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