Sub ReplaceNames()
Dim N As Variant, NameList As Variant, NameCodes As Variant
NameList = Array("Alan Richard", "Sam Spade", "Joe Blow", "John Doe")
NameCodes = Array("AR001", "SS001", "JB001", "JD001")
For Each N In NameList
Cells.Replace N, NameCodes, xlPart, , False
Next
End Sub
Sorry, my fault, try this code instead...This code replaces all the cell values (all other names) with only AR001 and ignores other namecodes in the code.
Sub ReplaceNames()
Dim X As Long, NameList As Variant, NameCodes As Variant
NameList = Array("Alan Richard", "Sam Spade", "Joe Blow", "John Doe")
NameCodes = Array("AR001", "SS001", "JB001", "JD001")
For X = LBound(NameList) To UBound(NameList)
Cells.Replace NameList(X), NameCodes(X), xlPart, , False
Next
End Sub