Find and replace
Thank you!!!!!!!
I have been battling with this for days!!!
"Stefi" wrote:
Function FReplace1(ReplaceField1) As String
FReplace1 = Replace(ReplaceField1, "/", "_")
End Function
But you get the same with this worksheet function:
=SUBSTITUTE(A1,"/","_")
Regards,
Stefi
€˛lasca€¯ ezt Ć*rta:
HI, even with the typo corrrected - I am still getting the error.
Here is the corrected code, and I am still getting the error.
Function FReplace1(ReplaceField1) As String
If
Application.WorksheetFunction.IsNumber(Application .WorksheetFunction.Search("/", ReplaceField1)) = "true" Then
ReplaceField1 = Replace(ReplaceField1, "/", "_")
FReplace1 = ReplaceField1
Else
FReplace1 = ReplaceField1
End If
End Function
"Stefi" wrote:
FFeplace1 = ReplaceField1
There is a typo in this line: Type FReplace1 instead of FFeplace1
Regards,
Stefi
|