Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

How to compare text across multiple columns

Hi,

 

How do i compare text across multiple columns ignoring any blanks and ignoring case.

e.g.

 

Column1Column2Column3Column4Column5Expected Result
catcatcatcatcatTRUE
catCatCATcatcatTRUE
 catcat  TRUE
catcatcatercatcatFALSE

 

In Excel, i used the following formula and it worked fine:

 

=SUMPRODUCT((A2:E2<>"")/COUNTIF(A2:E2,A2:E2&""))=1

 

Thanks for any help.

  • Result =
    var a= {[Column1],[Column2],[Column3],[Column4],[Column5]}
    var b=FILTER(a,[Value]<>"")
    return COUNTROWS(DISTINCT(b))=1
     
    or more brutish:
    Result = COUNTROWS(FILTER(DISTINCT({[Column1],[Column2],[Column3],[Column4],[Column5]}),[Value]<>""))=1

4 Replies

  • Result =
    var a= {[Column1],[Column2],[Column3],[Column4],[Column5]}
    var b=FILTER(a,[Value]<>"")
    return COUNTROWS(DISTINCT(b))=1
     
    or more brutish:
    Result = COUNTROWS(FILTER(DISTINCT({[Column1],[Column2],[Column3],[Column4],[Column5]}),[Value]<>""))=1
    • Anonymous's avatar
      Anonymous
      Not applicable

      Both Solutions work.  Thank You so much.

  • here's a fun way:

     

    = SWITCH(TRUE(),[Column1]<>[Column2],FALSE(),[Column1]<>[Column3],FALSE(),[Column1]<>[Column4],FALSE(),[Column1]<>[Column5],FALSE(),TRUE())

    • Anonymous's avatar
      Anonymous
      Not applicable

      Doesn't seem to work if there are any blank columns.