Function FiltString(SourceStr As String, SearchStr As String, Optional ReplaceStr As String = "") As String Dim I As Integer FiltString = SourceStr I = InStr(1, FiltString, SearchStr) Do While I > 0 FiltString = Mid(FiltString, 1, I - 1) & ReplaceStr & Mid(FiltString, I + 1) I = InStr(I + Len(ReplaceStr), FiltString, SearchStr) Loop End Function