ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Find Special Characters Using Function (https://www.excelbanter.com/excel-discussion-misc-queries/231643-find-special-characters-using-function.html)

TGV

Find Special Characters Using Function
 
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


HelpExcel.com[_2_]

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



All times are GMT +1. The time now is 09:46 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com