Re: $$Excel-Macros$$ How to find special characters in a cell

2013-01-02 Thread The Viper
simply if you want to forbid those special characters while entering in the cell use the below formula in validation rule =LEN(A1)=LEN(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(A1,"/",""),"\",""),"*",""),"?",""),"<",""),">",""),"|",""),,"")) ask m

Re: $$Excel-Macros$$ How to find special characters in a cell

2013-01-02 Thread The Viper
place the name on a1 below formula should work with CSE =IF(SUM(IFERROR(FIND({"/","\","?","<",">","|","*",},A1),""))>0,"Wrong","Ok") On Wed, Jan 2, 2013 at 8:34 PM, wrote: > In excel 2012 I'm using the name typed in a cell as a part of the filename > when saved via a macro. > Because the fol

Re: $$Excel-Macros$$ How to find special characters in a cell

2013-01-02 Thread Lalit Mohan Pandey
Hi Danny, May be this code will work for you: *Private Sub Worksheet_SelectionChange(ByVal Target As Range)* * * *If Target.Resize(1, 1) = ThisWorkbook.Worksheets("JIBase").Range("G4") Then* *If Len(Trim(Target.Resize(1, 1).Value)) <> 0 Then* *If Not CreateFile(Target.Res

Re: $$Excel-Macros$$ How to find special characters in a cell

2013-01-02 Thread Anoop K Sharma
can you share workbook? On Wed, Jan 2, 2013 at 8:34 PM, wrote: > In excel 2012 I'm using the name typed in a cell as a part of the filename > when saved via a macro. > Because the following characters /\*?"<>| are not allowed in a filename I > want to do a check in the cell. > The idea is to pu

$$Excel-Macros$$ How to find special characters in a cell

2013-01-02 Thread dannymariens
In excel 2012 I'm using the name typed in a cell as a part of the filename when saved via a macro. Because the following characters /\*?"<>| are not allowed in a filename I want to do a check in the cell. The idea is to put a warning in a free cell that the name isn't allowed when it contains on

RE: $$Excel-Macros$$ How to find special characters in a cell

2012-01-10 Thread Asa Rossoff
55 PM To: excel-macros@googlegroups.com Subject: Re: $$Excel-Macros$$ How to find special characters in a cell Hi Asa, Noorain I'm not sure if I understood your comments. Did you meant to say we need not use the key word "VBA" below? Thanks, Amar On 10/01/2012, Asa Rossoff

Re: $$Excel-Macros$$ How to find special characters in a cell

2012-01-10 Thread Kasireddy Amarender
s 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 t

Re: $$Excel-Macros$$ How to find special characters in a cell

2012-01-10 Thread NOORAIN ANSARI
gt; > *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**

RE: $$Excel-Macros$$ How to find special characters in a cell

2012-01-10 Thread Asa Rossoff
: $$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(Active

Re: $$Excel-Macros$$ How to find special characters in a cell

2012-01-10 Thread Kasireddy Amarender
Hi Noorain, It worked well, Thank you so much for your help. Best regads, Amar On 10/01/2012, NOORAIN ANSARI wrote: > 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(A

Re: $$Excel-Macros$$ How to find special characters in a cell

2012-01-10 Thread NOORAIN ANSARI
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,

$$Excel-Macros$$ How to find special characters in a cell

2012-01-09 Thread Kasireddy Amarender
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 no