• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Apple to Apple Comparison and Highlighting the Mismatch Character

Ayyam Raj V

New Member
I need a excel function to compare the cell text and highlight the mismatches characters.

Example:

A1 cell has the value: Apple
B1 cell has the value: Apple1

I need that output as "Apple1" that "1" needs to be highlighted.
 
Might be possible with Power Query if you need to compare B to A (not the opposite) it's like this.
1689940635597.png
Code:
let
    Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
    Set_types = Table.TransformColumnTypes(Source,{{"Lemma", type text}, {"Compare", type text}}),
    Diff = Table.AddColumn(Set_types, "Difference", each
                  Text.Combine(
                       List.Difference(
                             Text.ToList([Compare])
                           , Text.ToList([Lemma]))
                        ,  " , ")
            )
in
    Diff
 
Most welcome, Ayyam. Glad to help.

Edit: I missed it was a thread on the VBA sub-forum. If you need that, be patient for others to reply.
 

Ayyam Raj V

Didn't You this in Ask an Excel Question-forum in the beginning?
Here one sample with VBA ...
You can change that color as You would like ...

Screenshot 2023-07-21 at 16.03.00.png
 

Attachments

  • Ayyam Raj V.xlsb
    16.5 KB · Views: 2
Back
Top