I need a formula to compare multiple columns for any two or more cells within the same row having the same content. If that is true, then display "TEXT A" (can be anything such as "TRUE"). If all of the values are different, display "TEXT B" or simply "FALSE".
I'm using an IF
formula but it will be time-consuming if there are many columns to compare, so I need a better formula.
=IF((B2=C2);"YES";IF((B2=D2);"YES";IF((C2=D2);"YES";"ALL DIFFERENT")))
The same goes with similar function with OR (resulted in true or false)
=AND(($C2<>$D2);($C2<>$E2);($D2<>$E2))
Below is a screenshot of the worksheet, which is just an example. My actual work has more than 4 columns.
The highlighted rows are the ones where there are two or more cells containing the same text (Group 2 should also be highlighted), hence those should display the "TEXT A" message.