Try: Sub AddTags() Dim ChkStr, ChkChar, OutStr, C ChkStr = Range("A1").Value OutStr = "" For C = 1 To Len(ChkStr) ChkChar = Mid(ChkStr, C, 1) If (IsNumeric(ChkChar)) Then OutStr = OutStr & "<N>" & ChkChar ElseIf ((ChkChar = UCase(ChkChar)) _ And (ChkChar <> " ")) Then OutStr = OutStr & "<H>" & ChkChar Else OutStr = OutStr & ChkChar End If Next C Range("B1").Value = OutStr End Sub
Paul ----- Original Message ---- > From: sivam <sivamma...@gmail.com> > To: Paul Schreiner <schreiner_p...@att.net> > Sent: Tue, October 5, 2010 8:57:18 AM > Subject: Re: $$Excel-Macros$$ Analysing > > suppose if a cell(one) having value like "Mathusudh ANan12" means i > need to take each and every cell and i need to check. If a particular > character having Capital letter than i need to put <H> infront of the > character. If it is number i need to put <N> infront of the character. > Please look into this.. > On Oct 5, 8:50 am, Paul Schreiner <schreiner_p...@att.net> wrote: > what do you want to do with them? > are they in a cell or from a userform? > > > > > > ----- Original Message ---- > > From: sivam <sivamma...@gmail.com> > > To: MS EXCEL AND VBA MACROS <excel-macros@googlegroups.com> > > Sent: Tue, October 5, 2010 8:39:34 AM > > Subject: $$Excel-Macros$$ Analysing > > > Hi > > My string is surha12hj > > Here i want to take each and every character and i need to take only > > charaters which is from A-Z or a-z.. Can any one help on to this. > > > -- > >---------------------------------------------------------------------------------- > >- > > Some important links for excel users: > > 1. Follow us on TWITTER for tips tricks and links : > >http://twitter.com/exceldailytip > > 2. Join our LinkedIN group @http://www.linkedin.com/groups?gid=1871310 > > 3. Excel tutorials athttp://www.excel-macros.blogspot.com > > 4. Learn VBA Macros athttp://www.quickvba.blogspot.com > > 5. Excel Tips and Tricks athttp://exceldailytip.blogspot.com > > > To post to this group, send email to excel-macros@googlegroups.com > > > <><><><><><><><><><><><><><><><><><><><><><> > > Like our page on facebook , Just follow below link > >http://www.facebook.com/pages/discussexcelcom/160307843985936?v=wall&...- > >Hide quoted text - > > - Show quoted text - -- ---------------------------------------------------------------------------------- Some important links for excel users: 1. Follow us on TWITTER for tips tricks and links : http://twitter.com/exceldailytip 2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310 3. Excel tutorials at http://www.excel-macros.blogspot.com 4. Learn VBA Macros at http://www.quickvba.blogspot.com 5. Excel Tips and Tricks at http://exceldailytip.blogspot.com To post to this group, send email to excel-macros@googlegroups.com <><><><><><><><><><><><><><><><><><><><><><> Like our page on facebook , Just follow below link http://www.facebook.com/pages/discussexcelcom/160307843985936?v=wall&ref=ts