Q:

Excel Match multiple criteria

Could someone help me turn this 2 Criteria match function into a 4 criteria match function please?  This one works, but is only the start:
=INDEX(range1,MATCH(1,(A19=range2)*(B19=range3),0))

I also want a third and fourth match in the above formula, with those two being an OR option.  I thought based upon the working version that this might work, but it doesn't:  
=INDEX(range1,MATCH(1,(A19=range2)*(B19=range3)*(OR(C19=range4,D19=range5)),0))

I've been trying to use AND commands, my initial version of the first code above being this:
=INDEX(range1,MATCH(1,AND(A19=range2,B19=range3),0))

It always returns #N/A after CTRL+ALT+ENTER is entered though, so it's obviously an issue with my understanding of either MATCH or AND (or both I guess), 
The first example works EXACTLY as intended, but unfortunately I don't know why and I can't work it out well enough to adapt it.  Maybe I'm too tired and have run out of space in my head for the peculiar way in which Excel formulas work, but I've read and re-read the help files for them and still it doesn't make sense to me.
Any help would be greatly appreciated, as always.
Thanks,
Joe

A:

I'm just guessing here, but would this work?
=INDEX(range1,MATCH(1,(A19=range2)*(B19=range3)*(((C19 = range4)+(D19 = range5))>0),0))

