Solved

# All cells in a row match in multiple columns

Posted on 2014-04-14
Medium Priority
212 Views
I need a formula that will produce the word "Yes" or "No" in the Match column if all the cells in a row of 4 columns match

Example

Column 1     Column2     Column3     Column4     Match
Apple            Apple          Orange         Apple          NO
Banana         Banana      Banana         Banana       YES
0
Question by:ablove3

LVL 13

Accepted Solution

Santosh Gupta earned 1000 total points
ID: 39999954
Try
=IF(AND(A1=B1,B1=C1,C1=D1),"yes","no")
0

LVL 43

Expert Comment

ID: 39999962
Try

=IF(SUMPRODUCT(--(A2:C2=B2:D2))=3,"Yes","No")
0

LVL 23

Expert Comment

ID: 39999986
Try:

=IF(COUNTIF(A2:D2,A2)=4,"YES","NO")
0

Author Closing Comment

ID: 40000040
I selected this answer, because it gave me the flexibilty to compare columns that were not all next to each other.

Thank you all for your input.
0

## Featured Post

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.