Hello Noorain, et.al.,

 

No need for the the VBA qualifiers.  You only need to specify the VBA
library name when you have another procedure with the same name in scope
that would otherwise be executed instead, which is probably better avoided
by not naming procedures with the names of builtins.  This concept for
qualifying applies to all procedures/methods that are in execution scope.

 

Asa

 

From: excel-macros@googlegroups.com [mailto:excel-macros@googlegroups.com]
On Behalf Of NOORAIN ANSARI
Sent: Tuesday, January 10, 2012 12:04 AM
To: excel-macros@googlegroups.com
Subject: Re: $$Excel-Macros$$ How to find special characters in a cell

 

Dear Amarender,

 

Please try it..

 

Sub Special_Character()
If ActiveCell.Value = "" Then
Exit Sub
End If
For k = 1 To Len(ActiveCell.Value)
If VBA.IsNumeric(Mid(ActiveCell.Value, k, 1)) = False And
(VBA.Asc(Mid(VBA.UCase(ActiveCell.Value), k, 1)) < 65 And
VBA.Asc(Mid(VBA.UCase(ActiveCell.Value), k, 1) > 90)) Then
spcl_chtr = spcl_chtr & Mid(ActiveCell.Value, k, 1)
End If
Next k
If spcl_chtr <> "" Then
MsgBox "Special Character " & spcl_chtr, vbInformation
Else
Exit Sub
End If
End Sub


See attached sheet

-- 

Thanks & regards,

Noorain Ansari

 <http://excelmacroworld.blogspot.com/> http://excelmacroworld.blogspot.com/

 <http://noorain-ansari.blogspot.com/> http://noorain-ansari.blogspot.com/

On Tue, Jan 10, 2012 at 11:59 AM, Kasireddy Amarender
<kassi.re...@gmail.com> wrote:

Hi All,

I would like to take your help in finding the special characters in a cell.

Here is the output I'm looking for.

B1 = XYZ_Apr'11

Then I should get a message box saying it has a special character (').

Similarly for all other special characters.

Here the special characters position is not fixed hence I'm unable to
use the regular experssion.

Thanks in advance.

Best regards,
Amar

--
FORUM RULES (986+ members already BANNED for violation)

1) Use concise, accurate thread titles. Poor thread titles, like Please
Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will
not get quick attention or may not be answered.

2) Don't post a question in the thread of another member.

3) Don't post questions regarding breaking or bypassing any security
measure.

4) Acknowledge the responses you receive, good or bad.

5)  Cross-promotion of, or links to, forums competitive to this forum in
signatures are prohibited.

NOTE  : Don't ever post personal or confidential data in a workbook. Forum
owners and members are not responsible for any loss.

----------------------------------------------------------------------------
--------------------------
To post to this group, send email to excel-macros@googlegroups.com





-- 
FORUM RULES (986+ members already BANNED for violation)
 
1) Use concise, accurate thread titles. Poor thread titles, like Please
Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will
not get quick attention or may not be answered.
 
2) Don't post a question in the thread of another member.
 
3) Don't post questions regarding breaking or bypassing any security
measure.
 
4) Acknowledge the responses you receive, good or bad.
 
5) Cross-promotion of, or links to, forums competitive to this forum in
signatures are prohibited. 
 
NOTE : Don't ever post personal or confidential data in a workbook. Forum
owners and members are not responsible for any loss.
 
----------------------------------------------------------------------------
--------------------------
To post to this group, send email to excel-macros@googlegroups.com

-- 
FORUM RULES (986+ members already BANNED for violation)

1) Use concise, accurate thread titles. Poor thread titles, like Please Help, 
Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get 
quick attention or may not be answered.

2) Don't post a question in the thread of another member.

3) Don't post questions regarding breaking or bypassing any security measure.

4) Acknowledge the responses you receive, good or bad.

5)  Cross-promotion of, or links to, forums competitive to this forum in 
signatures are prohibited. 

NOTE  : Don't ever post personal or confidential data in a workbook. Forum 
owners and members are not responsible for any loss.

------------------------------------------------------------------------------------------------------
To post to this group, send email to excel-macros@googlegroups.com

Reply via email to