Hi all
I have the following formula that I cannot seem to make work.
The return of the formula is "TRUE" even though I deliberately post an illegal character.
Can someone please correct me as to the problem.
Many thanks in advance
I have the following formula that I cannot seem to make work.
Excel Formula:
Function ContainsSpecialCharacters(str As String) As Boolean
For I = 1 To Len(str)
ch = Mid(str, I, 1)
Select Case ch
Case "&", ",", ";", ":", "(", ")", "%", "?", "!", "*"
ContainsSpecialCharacters = False
Case Else
ContainsSpecialCharacters = True
Exit For
End Select
Next
End Function
The return of the formula is "TRUE" even though I deliberately post an illegal character.
Can someone please correct me as to the problem.
Many thanks in advance