# Need Help with Index Function

#### kmprice710

##### New Member
 Date Player Player Code 4/1/1959 Chris Tom 123 12/5/1962 Dan Boyd 456 5/3/1961 Chris Peter 678 10/4/1960 Tom Boyd 789

<tbody>
</tbody>

 Date Player Code 4/1/1959 Tom ??? 5/3/1961 Chris ??? 10/4/1960 Boyd ???

<tbody>
</tbody>

Let's say I have a list of chess contests. I have the date and the two players and a game ID code.

Now below that I have a date and one of the players but I don't know the ID code.

How do I index the above table so that it will output the code if the date matches and one of the players is in that row?

### Excel Facts

Enter current date or time
Ctrl+: enters current time. Ctrl+; enters current date. Use Ctrl+: Ctrl+; Enter for current date & time.

#### Eric W

##### MrExcel MVP
Try:

ABCDEFGH
1DatePlayerPlayerCodeDatePlayerCode
24/1/1959ChrisTom1234/1/1959Tom123
312/5/1962DanBoyd4565/3/1961Chris678
45/3/1961ChrisPeter67810/4/1960Boyd789
510/4/1960TomBoyd789

</tbody>
Sheet17

Array Formulas
CellFormula
H2{=INDEX(\$D\$2:\$D\$5,SMALL(IF(\$A\$2:\$A\$5=F2,IF((\$B\$2:\$B\$5=G2)+(\$C\$2:\$C\$5=G2),ROW(\$A\$2:\$A\$5)-ROW(\$A\$2)+1)),1))}

</tbody>
Entered with Ctrl+Shift+Enter. If entered correctly, Excel will surround with curly braces {}.
Note: Do not try and enter the {} manually yourself

<tbody>
</tbody>

Replies
3
Views
68
Replies
1
Views
39
Replies
1
Views
177
Replies
38
Views
2K
Replies
8
Views
596