View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
HelpExcel.com[_2_] HelpExcel.com[_2_] is offline
external usenet poster
 
Posts: 39
Default Find Special Characters Using Function

TGV,

The following custom function will return JUST the special characters:

Public Function special(rng As Range) As String

Dim i As Integer
Dim strNew As String

For i = 1 To Len(rng.Value)
If Not (Mid(rng.Value, i, 1) = "a" And Mid(rng.Value, i, 1) <= "z")
And Not (Mid(rng.Value, i, 1) = "A" And Mid(rng.Value, i, 1) <= "Z") And _
Not (Mid(rng.Value, i, 1) = "0" And Mid(rng.Value, i, 1) <=
"9") Then
strNew = strNew & Mid(rng.Value, i, 1)
End If
Next

special = strNew

End Function

--
Regards,
Eddie
http://www.HelpExcel.com


"TGV" wrote:

Hi,

I am having datas in A Column in the below mentioned manner.

A
123'658
346*785
569}912
265879
792{1039
1015"1166
564897
1238@1293

Now I want a function that should check the cell for special characters.
Some of the cells does not consist the special characters, So I have to take
the data separately what are all the cells contains special characters. Is
it possible? If so please suggest me.

Awaiting for your reply.

Thanks in Advance!

TGV