Hi,
With the data that I had attached they were not highlighted all combinations.
Thanks to the suggestions of snb I completed the code
Code:Option Explicit Option Compare Text Sub M_snb() Dim sn, Txt, k Dim CodesToReplace As String, s As String Dim J As Long sn = [index(proper(B3:B12),)] CodesToReplace = "di da con per mm in a e la le" Txt = Split(CodesToReplace, " ") s = Space(1) For J = 1 To UBound(sn) If InStr(sn(J, 1), " ") Then For Each k In Txt sn(J, 1) = Replace(sn(J, 1) & s, s & k & s, s & LCase(k) & s) Next End If Next [I3:I12] = sn End Sub




Reply With Quote
Bookmarks