Here's a better data sample to offer. Any help is greatly appreciated
As you can see, there's 2 matches of A and 5 so I would need to return Line 7 and Line 8..
[TABLE="width: 448"]
<tbody>[TR]
[TD="class: xl65, width: 64"]Data[/TD]
[TD="class: xl65, width: 64"][/TD]
[TD="class: xl65, width: 64"][/TD]
[TD="class: xl65, width: 64"][/TD]
[TD="class: xl65, width: 64"]Result[/TD]
[TD="class: xl65, width: 64"][/TD]
[TD="class: xl65, width: 64"][/TD]
[/TR]
[TR]
[TD="class: xl66"]Criteria1[/TD]
[TD="class: xl66"]Criteria2[/TD]
[TD="class: xl66"]Line No.[/TD]
[TD="class: xl65"][/TD]
[TD="class: xl66"]Criteria1[/TD]
[TD="class: xl66"]Criteria2[/TD]
[TD="class: xl66"]Line No.[/TD]
[/TR]
[TR]
[TD="class: xl66"]A[/TD]
[TD="class: xl66"]2[/TD]
[TD="class: xl66"]Line1[/TD]
[TD="class: xl65"][/TD]
[TD="class: xl66"]A[/TD]
[TD="class: xl66"]5[/TD]
[TD="class: xl66"]Line7[/TD]
[/TR]
[TR]
[TD="class: xl66"]A[/TD]
[TD="class: xl66"]4[/TD]
[TD="class: xl66"]Line2[/TD]
[TD="class: xl65"][/TD]
[TD="class: xl66"]A[/TD]
[TD="class: xl66"]5[/TD]
[TD="class: xl66"]Line8[/TD]
[/TR]
[TR]
[TD="class: xl66"]A[/TD]
[TD="class: xl66"]1[/TD]
[TD="class: xl66"]Line3[/TD]
[TD="class: xl65"][/TD]
[TD="class: xl66"]A[/TD]
[TD="class: xl66"]4[/TD]
[TD="class: xl66"]Line2[/TD]
[/TR]
[TR]
[TD="class: xl66"]A[/TD]
[TD="class: xl66"]3[/TD]
[TD="class: xl66"]Line4[/TD]
[TD="class: xl65"][/TD]
[TD="class: xl66"]A[/TD]
[TD="class: xl66"]1[/TD]
[TD="class: xl66"]Line3[/TD]
[/TR]
[TR]
[TD="class: xl66"]A[/TD]
[TD="class: xl66"]2[/TD]
[TD="class: xl66"]Line5[/TD]
[TD="class: xl65"][/TD]
[TD="class: xl66"]A[/TD]
[TD="class: xl66"]1[/TD]
[TD="class: xl66"]Line9[/TD]
[/TR]
[TR]
[TD="class: xl66"]A[/TD]
[TD="class: xl66"]2[/TD]
[TD="class: xl66"]Line6[/TD]
[TD="class: xl65"][/TD]
[TD="class: xl66"]B[/TD]
[TD="class: xl66"]5[/TD]
[TD="class: xl66"]Line12[/TD]
[/TR]
[TR]
[TD="class: xl66"]A[/TD]
[TD="class: xl66"]5[/TD]
[TD="class: xl66"]Line7[/TD]
[TD="class: xl65"][/TD]
[TD="class: xl66"]B[/TD]
[TD="class: xl66"]5[/TD]
[TD="class: xl66"]Line15[/TD]
[/TR]
[TR]
[TD="class: xl66"]A[/TD]
[TD="class: xl66"]5[/TD]
[TD="class: xl66"]Line8[/TD]
[TD="class: xl65"][/TD]
[TD="class: xl66"]B[/TD]
[TD="class: xl66"]4[/TD]
[TD="class: xl66"]Line14[/TD]
[/TR]
[TR]
[TD="class: xl66"]A[/TD]
[TD="class: xl66"]1[/TD]
[TD="class: xl66"]Line9[/TD]
[TD="class: xl65"][/TD]
[TD="class: xl66"]B[/TD]
[TD="class: xl66"]3[/TD]
[TD="class: xl66"]Line11[/TD]
[/TR]
[TR]
[TD="class: xl66"]A[/TD]
[TD="class: xl66"]5[/TD]
[TD="class: xl66"]Line10[/TD]
[TD="class: xl65"][/TD]
[TD="class: xl66"]B[/TD]
[TD="class: xl66"]1[/TD]
[TD="class: xl66"]Line16[/TD]
[/TR]
[TR]
[TD="class: xl66"]B[/TD]
[TD="class: xl66"]3[/TD]
[TD="class: xl66"]Line11[/TD]
[TD="class: xl65"][/TD]
[TD="class: xl66"]C[/TD]
[TD="class: xl66"]5[/TD]
[TD="class: xl66"]Line26[/TD]
[/TR]
[TR]
[TD="class: xl66"]B[/TD]
[TD="class: xl66"]5[/TD]
[TD="class: xl66"]Line12[/TD]
[TD="class: xl65"][/TD]
[TD="class: xl66"]C[/TD]
[TD="class: xl66"]4[/TD]
[TD="class: xl66"]Line24[/TD]
[/TR]
[TR]
[TD="class: xl66"]B[/TD]
[TD="class: xl66"]3[/TD]
[TD="class: xl66"]Line13[/TD]
[TD="class: xl65"][/TD]
[TD="class: xl66"]C[/TD]
[TD="class: xl66"]3[/TD]
[TD="class: xl66"]Line23[/TD]
[/TR]
[TR]
[TD="class: xl66"]B[/TD]
[TD="class: xl66"]4[/TD]
[TD="class: xl66"]Line14[/TD]
[TD="class: xl65"][/TD]
[TD="class: xl66"]C[/TD]
[TD="class: xl66"]2[/TD]
[TD="class: xl66"]Line27[/TD]
[/TR]
[TR]
[TD="class: xl66"]B[/TD]
[TD="class: xl66"]5[/TD]
[TD="class: xl66"]Line15[/TD]
[TD="class: xl65"][/TD]
[TD="class: xl66"]C[/TD]
[TD="class: xl66"]2[/TD]
[TD="class: xl66"]Line28[/TD]
[/TR]
[TR]
[TD="class: xl66"]B[/TD]
[TD="class: xl66"]1[/TD]
[TD="class: xl66"]Line16[/TD]
[TD="class: xl65"][/TD]
[TD="class: xl65"][/TD]
[TD="class: xl65"][/TD]
[TD="class: xl65"][/TD]
[/TR]
[TR]
[TD="class: xl66"]B[/TD]
[TD="class: xl66"]2[/TD]
[TD="class: xl66"]Line17[/TD]
[TD="class: xl65"][/TD]
[TD="class: xl65"][/TD]
[TD="class: xl65"][/TD]
[TD="class: xl65"][/TD]
[/TR]
[TR]
[TD="class: xl66"]B[/TD]
[TD="class: xl66"]2[/TD]
[TD="class: xl66"]Line18[/TD]
[TD="class: xl65"][/TD]
[TD="class: xl65"][/TD]
[TD="class: xl65"][/TD]
[TD="class: xl65"][/TD]
[/TR]
[TR]
[TD="class: xl66"]B[/TD]
[TD="class: xl66"]2[/TD]
[TD="class: xl66"]Line19[/TD]
[TD="class: xl65"][/TD]
[TD="class: xl65"][/TD]
[TD="class: xl65"][/TD]
[TD="class: xl65"][/TD]
[/TR]
[TR]
[TD="class: xl66"]B[/TD]
[TD="class: xl66"]1[/TD]
[TD="class: xl66"]Line20[/TD]
[TD="class: xl65"][/TD]
[TD="class: xl65"][/TD]
[TD="class: xl65"][/TD]
[TD="class: xl65"][/TD]
[/TR]
[TR]
[TD="class: xl66"]C[/TD]
[TD="class: xl66"]1[/TD]
[TD="class: xl66"]Line21[/TD]
[TD="class: xl65"][/TD]
[TD="class: xl65"][/TD]
[TD="class: xl65"][/TD]
[TD="class: xl65"][/TD]
[/TR]
[TR]
[TD="class: xl66"]C[/TD]
[TD="class: xl66"]1[/TD]
[TD="class: xl66"]Line22[/TD]
[TD="class: xl65"][/TD]
[TD="class: xl65"][/TD]
[TD="class: xl65"][/TD]
[TD="class: xl65"][/TD]
[/TR]
[TR]
[TD="class: xl66"]C[/TD]
[TD="class: xl66"]3[/TD]
[TD="class: xl66"]Line23[/TD]
[TD="class: xl65"][/TD]
[TD="class: xl65"][/TD]
[TD="class: xl65"][/TD]
[TD="class: xl65"][/TD]
[/TR]
[TR]
[TD="class: xl66"]C[/TD]
[TD="class: xl66"]4[/TD]
[TD="class: xl66"]Line24[/TD]
[TD="class: xl65"][/TD]
[TD="class: xl65"][/TD]
[TD="class: xl65"][/TD]
[TD="class: xl65"][/TD]
[/TR]
[TR]
[TD="class: xl66"]C[/TD]
[TD="class: xl66"]3[/TD]
[TD="class: xl66"]Line25[/TD]
[TD="class: xl65"][/TD]
[TD="class: xl65"][/TD]
[TD="class: xl65"][/TD]
[TD="class: xl65"][/TD]
[/TR]
[TR]
[TD="class: xl66"]C[/TD]
[TD="class: xl66"]5[/TD]
[TD="class: xl66"]Line26[/TD]
[TD="class: xl65"][/TD]
[TD="class: xl65"][/TD]
[TD="class: xl65"][/TD]
[TD="class: xl65"][/TD]
[/TR]
[TR]
[TD="class: xl66"]C[/TD]
[TD="class: xl66"]2[/TD]
[TD="class: xl66"]Line27[/TD]
[TD="class: xl65"][/TD]
[TD="class: xl65"][/TD]
[TD="class: xl65"][/TD]
[TD="class: xl65"][/TD]
[/TR]
[TR]
[TD="class: xl66"]C[/TD]
[TD="class: xl66"]2[/TD]
[TD="class: xl66"]Line28[/TD]
[TD="class: xl65"][/TD]
[TD="class: xl65"][/TD]
[TD="class: xl65"][/TD]
[TD="class: xl65"][/TD]
[/TR]
[TR]
[TD="class: xl66"]C[/TD]
[TD="class: xl66"]4[/TD]
[TD="class: xl66"]Line29[/TD]
[TD="class: xl65"][/TD]
[TD="class: xl65"][/TD]
[TD="class: xl65"][/TD]
[TD="class: xl65"][/TD]
[/TR]
[TR]
[TD="class: xl66"]C[/TD]
[TD="class: xl66"]5[/TD]
[TD="class: xl66"]Line30[/TD]
[TD="class: xl65"][/TD]
[TD="class: xl65"][/TD]
[TD="class: xl65"][/TD]
[TD="class: xl65"][/TD]
[/TR]
</tbody>[/TABLE]