Dear Pavan,
Please try it..
Function compare(rng As Range, rng1 As Range)
Dim i As Integer
rng.Font.Color = vbBlack
rng1.Font.Color = vbBlack
For i = 1 To VBA.Len(rng)
If VBA.Mid(rng, i, 1) <> VBA.Mid(rng1, i, 1) Then
rng.Characters(i, 1).Font.Color = vbRed
rng1.Characters(i,
Sub test()
Call compare_strings(Range("a1"), Range("b1"), Range("c1"))
End Sub
Sub compare_strings(rng1 As Range, rng2 As Range, rng3 As Range)
Dim i As Long
If Len(rng1.Value) <> Len(rng2.Value) Then
rng3.Value = "Length Mismatch "
Else
For i = 1 To Len(rng1.Value)
Hi Team,
Can any one help me on this
On Wednesday, October 10, 2012, pavan Kumar wrote:
> Hi Team,
>
> I am looking for macro to compare and highlight,i have given the example
below
>
> two words has been compared
>
> hello and hella
>
> i need" o "and" a" to be higlighted in red
>
> --
> Join of