JB, I would make the point that using INDEX in this form is generally regarded as being pretty slow - else we'd use all the time in preference to SUMPRODUCT.
I think also that the above would fail to return correct result if the value in A appeared multiple times but under different codes (ie the MATCH should be conducted against the concatenation of I & A rather than just A) ... I believe also that should any entries in A be blank on Sheet2 then you would get an #N/A error.
Adopting JB's approach in SUMPRODUCT form with the above taken into account I believe something along the lines of:
should work... it would of course be easier to have a concatenation column at source, eg:
Then
which is as you can see a little less convoluted... but not much
Bookmarks