Richard,
You're right. My bad. Now for column d, where I want to show the matching words, is there a way to do this in all one script?
BTW..thanks to both of you. Really apprecaited.
Richard,
You're right. My bad. Now for column d, where I want to show the matching words, is there a way to do this in all one script?
BTW..thanks to both of you. Really apprecaited.
A small modification to Martin's code will do it.
![]()
Function SameWords(A As Range, B As Range) As String AArray = Split(LCase(A), " ") BArray = Split(LCase(B), " ") For AWord = 0 To UBound(AArray) If Len(AArray(AWord)) > 0 Then AWordNew = True For BWord = 0 To UBound(BArray) If AArray(AWord) = BArray(BWord) Then AWordNew = False Exit For End If Next BWord If AWordNew = False Then 'True Then SameWords = SameWords & AArray(AWord) & "," End If End If Next AWord If Len(SameWords) > 0 Then SameWords = Left(SameWords, Len(SameWords) - 1) End Function
Richard Buttrey
RIP - d. 06/10/2022
If any of the responses have helped then please consider rating them by clicking the small star iconbelow the post.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks