Hello.. I am trying to get a formula so that when A1 matches a Product ID in Sheet2,Column B, it will
a) return the data from the relevant row in Column D, if the corresponding row in column Q = No or,
b) return the data from the relevant row in Column R, if the corresponding row in column Q = Yes
I've tried lots of variations like these two but none are working so I'm thinking I must be on the wrong track.
=IF('sheet2'!Q:Q ="No", INDEX('sheet2'!D:D,MATCH(A1,'sheet2'!B:B,0)),INDEX('sheet2'!R:R,MATCH(A1,'sheet2'!B:B,0)))
=IFERROR(INDEX('sheet2'!D:D,MATCH(A1,'sheet2'!B:B,0),MATCH('yesnosheet'!A1,'sheet2'!Q:Q,0)),INDEX('sheet2'!R:R,MATCH(A1,'sheet2'!B:B,0),MATCH('yesnosheet'!A2,'sheet2'!Q:Q, 0)))
a) return the data from the relevant row in Column D, if the corresponding row in column Q = No or,
b) return the data from the relevant row in Column R, if the corresponding row in column Q = Yes
I've tried lots of variations like these two but none are working so I'm thinking I must be on the wrong track.
=IF('sheet2'!Q:Q ="No", INDEX('sheet2'!D:D,MATCH(A1,'sheet2'!B:B,0)),INDEX('sheet2'!R:R,MATCH(A1,'sheet2'!B:B,0)))
=IFERROR(INDEX('sheet2'!D:D,MATCH(A1,'sheet2'!B:B,0),MATCH('yesnosheet'!A1,'sheet2'!Q:Q,0)),INDEX('sheet2'!R:R,MATCH(A1,'sheet2'!B:B,0),MATCH('yesnosheet'!A2,'sheet2'!Q:Q, 0)))