Forgot to add absolutes to the error trap portion.
=IF(ISNA(MATCH(A1&2,val!$A$1:$A$20&val!$B$1:$B$20,0)),"",INDEX(val!$C$1:$C$2
0,MATCH(1,(val!$A$1:$A$20=A1)*(val!$B$1:$B$20=2),0)))
--
HTH,
RD
==============================================
Please keep all correspondence within the Group, so all may benefit!
==============================================
Try this array formula to eliminate the #N/A! error:
=IF(ISNA(MATCH(A1&2,val!A1:A8&val!B1:B8,0)),"",INDEX(val!$C$1:$C$8,MATCH(1,(
val!$A$1:$A$8=A1)*(val!$B$1:$B$8=2),0)))
Remember to enter with CSE.
--
HTH,
RD
==============================================
Please keep all correspondence within the Group, so all may benefit!
==============================================
Thank you gentlemen, both your answers give the result I am looking for.
There is one change needed for both answers though, where there is no value
to return#N/A is returned
Pat
Aladin Akyurek said:
[...]
What follows is the test workbook I am using:
val!
A1 = car B1 = 1 C1 = T1
A2 = lorry B2 = 1 C2 = T4
A3 = lorry B3 = 2 C3 = T2
A4 = motorbike B4 = 1 C4 = T1
A5 = motorbike B5 = 2 C5 = T2
A6 = tractor B6 = 1 C6 = T2
A7 = motorbike B7 = 3 C7 = T4
A8 = car B8 = 2 C8 = T3
In D1 on the Val sheet enter & copy down:
=A1&CHAR(127)&B1
cc!
A1 = car B1 = T3
A2 = lorry B2 = T2
A3 = motorbike B3 = T2
A4 = tractor B4 =
[...]
In B1 on the cc sheet enter & copy down:
=INDEX(val!$C$1:$C$8,MATCH(A1&CHAR(127)&2,val!$D$1:$D$8,0))