Forum Discussion
pinkyswear
Aug 31, 2023Copper Contributor
Text Comparison
 Hi! I have two text columns and I need to compare them based on their similarity  The first column contains main keywords, the second column contains two lines with the terms and similar cases. Pleas...
Patrick2788
Sep 02, 2023Silver Contributor
I went with a solution using MAP:
=LET(
    SplitTerms, LAMBDA(ArrA, ArrB,
        LET(
            TermsA, TEXTSPLIT(ArrA, , ", "),
            TermsB, TEXTSPLIT(ArrB, , ", "),
            AllTerms, VSTACK(TermsA, TermsB),
            matches, COUNT(XMATCH(TermsA, TermsB)),
            denom, COUNTA(UNIQUE(AllTerms)),
            matches / denom
        )
    ),
    MAP(ListA, ListB, SplitTerms)
)- pinkyswearSep 06, 2023Copper ContributorPatrick2788 and PeterBartholomew1 Hi! Thank you very much for your reply! Unfortunately, it's giving me the following error: "The first argument of LET must be a valid name." Please let me know if I should do some particular changes in the formula. I am comparing cells C2 and G2. A more particular example of the table would be provided further: Thank you in advance! Appreciate your help! flower_sh Category: flower_sh 
 Keywords: tree care service, tree trimming, tree pruning, tree thinning, tree care, canopy balancingarchitec_serv Category: architec_serv 
 Keywords: interior designer, residential design, commercial design, interior design services, project management serviceflower_sh ,home_st Category: home_st 
 Keywords: custom made fire pits, state of the art equipment, laser cutting technologies, premium quality cuts, stainless steelhome_st Category: flower_sh 
 Keywords: lawn care, affordable prices, quality service, mowing, weed removal, grass blowing, snow-blowing- Patrick2788Sep 06, 2023Silver ContributorThis might be a good time to enable Advanced Formula Environment (AFE), if you don't already have access. AFE is much better with line breaks than the formula bar which may have mangled the formula.