Forum Discussion

eacrusher's avatar
eacrusher
Copper Contributor
Dec 25, 2025

Index and match mystery (for me that is...)

Hello,

I am having a hard time with an Index and match function I created. It's very simple but I am overlooking something. 

I am creating a file in which I can keep track of my golf progress. In golf you use a handicap system. This means that based on your formal handicap you get a number of extra strokes on a course. 


For instance: 
The formal handicap of a player is 21.3 

Ranges: 

FromtoCourse handicap additional strokes 
16,419,43
19,522,54
22,625,75

 

In this example the player is awarded 4 additional strokes based on that 21.3 falls in the range from 19,5 to 22,5. 

I've created a function but it doesn't always seem to work...It does return a value but not always the correct one....
=INDEX(C21:C36;MATCH(C48;A21:A36+(C48<=B21:B36);1))

In cell C48 people can fill in their formal handicap. 
In cells A21-A36 the 'from' values of the range
In cells B21-B36 the 'to' values of the range

In cells C21-C36 the extra strokes for the course handicap


What am I doing wrong? 

Merry Xmas!!!! :-)

4 Replies

  • IlirU's avatar
    IlirU
    Brass Contributor

    Or

    =XLOOKUP(1, (A21:A48 <= D48) * (B21:B48 >= D48), C21:C48)

     

  • Detlef_Lewin's avatar
    Detlef_Lewin
    Silver Contributor
    =INDEX(C21:C36;MATCH(C48;A21:A36);1)

    or

    =XLOOKUP(C48;A21:A36;C21:C36;;-1;1)

     

Resources