# If INDEX,MATCH function returns 0, can I change it to use value from adjacent cell?

1. ## If INDEX,MATCH function returns 0, can I change it to use value from adjacent cell?

Hi,

If a INDEX,MATCH function returns a zero, how do I get it to use the value in the adjacent cell which is a unique number?

=INDEX(Sheet2!A:C,MATCH(A2,Sheet2!A:A,0),3)

Example: ``Please Login or Register  to view this content.``
To change the 0 in B3 to whatever is in A3.

Thanks,
Chris  Register To Reply

2. ## Re: If INDEX,MATCH function returns 0, can I change it to use value from adjacent cel

=if(INDEX(Sheet2!A:C,MATCH(A2,Sheet2!A:A,0),3)=0,A1,INDEX(Sheet2!A:C,MATCH(A2,Sheet2!A:A,0),3))  Register To Reply

3. ## Re: If INDEX,MATCH function returns 0, can I change it to use value from adjacent cel

Thank you for the formula. I was looking between IF, ISERROR, etc.

=IF(INDEX(Sheet2!A:C,MATCH(A2,Sheet2!A:A,0),3)=0,A2,INDEX(Sheet2!A:C,MATCH(A2,Sheet2!A:A,0),3))

Problem is SOLVED!

Thanks,
Chris  Register To Reply