Forum Discussion
Emma Spickett
Mar 05, 2018Copper Contributor
Comparing data to return a value
Hi,
I have 5 columns of data. If A and B match E and F, I want the code in G to appear in C. Please can someone help with the formula?
Many thanks,
Emma
A
B
C
D
E
...
Haytham Amairah
Mar 05, 2018Silver Contributor
Hi Emma,
You can depend on this formula:
=IF(AND(A2=E2,B2=F2),G2,"")
Please find the attached file.
Emma Spickett
Mar 05, 2018Copper Contributor
Thanks for this. Does it not assume though that the correct answer is on the same row?
Haytham Amairah wrote:
Hi Emma,
You can depend on this formula:
=IF(AND(A2=E2,B2=F2),G2,"")Please find the attached file.
- Haytham AmairahMar 05, 2018Silver Contributor
Sorry about that!
Please use this formula instead:
=INDEX($G$2:$G$13,INDEX(MATCH(A2&B2,$E$2:$E$13&$F$2:$F$13,0),))
Please find the attached file.
- Emma SpickettMar 05, 2018Copper Contributor
Brilliant! Thank you!
Haytham Amairah wrote:
Sorry about that!
Please use this formula instead:
=INDEX($G$2:$G$13,INDEX(MATCH(A2&B2,$E$2:$E$13&$F$2:$F$13,0),))
Please find the attached file.