This is in part a test of posting from excelforum, but I'll add something useful, too.

A subset of 5 IDs from a larger set appears in X4:X8. An arbitrary ID is entered in X12. If the ID in X12 matches an ID in X4:X8, X13 should return the index of that matching entry or 6 if no match exists. The typical way to do this is

=IF(ISNUMBER(MATCH(X12,X4:X8,0)),MATCH(X12,X4:X8,0),6)

However, if X9 isn't otherwise used, enter * in it and use

=MATCH(1,COUNTIF(X12,X4:X9),0)