0
votes

Column A, Column B and Column C have some numbers. I want to test if values of either A or B are present in C. If yes, then display yes, else no. Please let me know an easy excel formula for this

enter image description here

1
Thank you Ben but I am unable to get the correct answer still. A and B have receipt numbers. C also has a receipt number. I want to check if either A or B are present in C. If either A or B is present, then show yes. Otherwise No. Have been getting really crazy over this for a few days.Rra
Can I share the file with you somehow? Thanks a lot for your helpRra
I have added a screenshot. hope it is better now.Rra
=IF(COUNTIF(P:P,X2)+COUNTIF(P:P,Y2)>0,"yes","no"). Or maybe =IF(COUNTIF(P:P,"*"&X2&"*")+COUNTIF(P:P,"*"&Y2&"*")>0,"yes","no")BigBen

1 Answers

0
votes

You can achieve it by doing using the formula below

=IF(OR(IF(COUNTIF($P:$P,X1)>0,1,0),IF(COUNTIF($P:$P,Y1)>0,1,0)),"YES","NO")

Below is a sample data and result also

Sample data and result