I tried to create a VBA code that convert a string (in an array) to a new string (which also in an array). However, i'm getting a problem with those original strings that almost identical. E.g. "Power Partner", "Power Partner OEM".
Is there any way I can convert them accurately? Thanks!
Private Function cvrt(orig As Variant) As Variant
Dim orgVal As Variant, newVal As Variant, i As Integer
cvrt = orig
orgVal = Array("Central", "Clarke", "Power Partner", "Power Partner OEM")
newVal = Array("Central Data", "Clarke Data", "Onsite Power Partner", "Onsite Energy OEM")
For i = 0 To 3
cvrt = Replace(cvrt, orgVal(i), newVal(i), vbTextCompare)
Next i
End Function

origthat you are passing to the function?origthat you are passing to the function?origcame from a range, which is technically listed in theorgVal