View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Rick Rothstein Rick Rothstein is offline
external usenet poster
 
Posts: 5,934
Default find and replace numeric strings in larger text strings

That works great!! Thanks!

Here is shorter UDF which will function the same as the one James posted...

Function IDKiller(ByVal S As String) As String
Dim X As Long
For X = 1 To Len(S)
If Mid(S, X, 10) Like "##########" Then
Mid(S, X) = "XXXXXXXXXX"
Exit For
End If
Next
IDKiller = S
End Function

Rick Rothstein (MVP - Excel)