This should work, then. It limits the Index from row 1 to row 9999 instead of referring to the whole columns.
=IF(OR(J2="a",J2="b"),INDEX('Christmas Gifts A & B'!$K$1:$K$9999,MATCH('Master Database'!A2&'Master Database'!B2&'Master Database'!C2,INDEX('Christmas Gifts A & B'!$A$1:$A$9999&'Christmas Gifts A & B'!$B$1:$B$9999&'Christmas Gifts A & B'!$C$1:$C$9999,0),0)),"")
Note that the formula in the worksheet you attached was not identical with the formula I posted. Where my formula referred to K:K yours had a reference to J:K. Make sure to copy and paste and don't edit unless you know what you're doing!!
Bookmarks