RE: $$Excel-Macros$$ Text Cleaning

2012-06-05 Thread Asa Rossoff
oo. Asa From: excel-macros@googlegroups.com [mailto:excel-macros@googlegroups.com] On Behalf Of SG Sent: Tuesday, June 05, 2012 2:34 AM To: excel-macros@googlegroups.com Subject: Re: $$Excel-Macros$$ Text Cleaning Hi Asa, your code really works exact for me.Thanks for the help but can u pl

Re: $$Excel-Macros$$ Text Cleaning

2012-06-05 Thread SG
* > > *Regards* > > *Rajan verma* > > *+91 7838100659 [IM-Gtalk]* > > > > *From:* excel-macros@googlegroups.com [mailto: > excel-macros@googlegroups.com] *On Behalf Of *sonal > *Sent:* 04 June 2012 9:04 > *To:* excel-macros@googlegroups.com > *Subject:* Re:

Re: $$Excel-Macros$$ Text Cleaning

2012-06-05 Thread SG
Hi david. that "e" was bymistake.I want to clean special characters & spaces & it's done by Asa's code. thanks for your concern. On Tuesday, June 5, 2012 6:11:41 AM UTC+5:30, David Grugeon wrote: > Hi Sonal > > I hope you realise that if you apply any of the suggested solutions to > your stri

Re: $$Excel-Macros$$ Text Cleaning

2012-06-05 Thread SG
ome to the group! > > > > Asa > > > > *From:* excel-macros@googlegroups.com [mailto: > excel-macros@googlegroups.com] *On Behalf Of *Asa Rossoff > *Sent:* Monday, June 04, 2012 8:38 AM > *To:* excel-macros@googlegroups.com > *Subject:* RE: $$Excel-Macros

Re: $$Excel-Macros$$ Text Cleaning

2012-06-04 Thread David Grugeon
Hi Sonal I hope you realise that if you apply any of the suggested solutions to your string " rahul;6e3-" you will get "rahule" not "rahul". I hope this is what you want. If not we might need to see a greater selection of strings to see if there is a pattern (like - always cut them off at the fi

RE: $$Excel-Macros$$ Text Cleaning

2012-06-04 Thread Asa Rossoff
: excel-macros@googlegroups.com [mailto:excel-macros@googlegroups.com] On Behalf Of Asa Rossoff Sent: Monday, June 04, 2012 8:38 AM To: excel-macros@googlegroups.com Subject: RE: $$Excel-Macros$$ Text Cleaning Hi Sonal, Another function for you: Function CleanText(Text As String) As String Dim New

RE: $$Excel-Macros$$ Text Cleaning

2012-06-04 Thread Rajan_Verma
@googlegroups.com Subject: Re: $$Excel-Macros$$ Text Cleaning again thanks but i know how to run a macro what i was asking is the explanation for "COD" that ypu have used in your code. On Monday, June 4, 2012 8:59:23 PM UTC+5:30, Rajan_Verma wrote: Ok.. Press ALT+F11 ALT +

RE: $$Excel-Macros$$ Text Cleaning

2012-06-04 Thread Asa Rossoff
Hi Sonal, Another function for you: Function CleanText(Text As String) As String Dim NewText As String, Character As String * 1, Position As Long For Position = 1 To Len(Text) Character = Mid(Text, Position, 1) If Character Like "[A-z]" Or Character Like "#" Then

Re: $$Excel-Macros$$ Text Cleaning

2012-06-04 Thread sonal
el-macros@googlegroups.com] *On Behalf Of *sonal gupta > *Sent:* 04 June 2012 8:58 > *To:* excel-macros@googlegroups.com > *Subject:* Re: $$Excel-Macros$$ Text Cleaning > > > > Thanks rajan, but i'm new to macros..can you please explain the use of > &quo

Re: $$Excel-Macros$$ Text Cleaning

2012-06-04 Thread ashish koul
select the range on the worksheet and run the macro On Mon, Jun 4, 2012 at 8:58 PM, sonal gupta wrote: > Thanks ashish.I'll try it. > > On Monday, June 4, 2012 8:51:06 PM UTC+5:30, ashish wrote: >> >> Sub text_clean() >> Application.DisplayAlerts = False >> Application.Calculation = xlCalculat

RE: $$Excel-Macros$$ Text Cleaning

2012-06-04 Thread Rajan_Verma
June 2012 8:58 To: excel-macros@googlegroups.com Subject: Re: $$Excel-Macros$$ Text Cleaning Thanks rajan, but i'm new to macros..can you please explain the use of "COD" in this. On Monday, June 4, 2012 8:51:52 PM UTC+5:30, Rajan_Verma wrote: Try this :

Re: $$Excel-Macros$$ Text Cleaning

2012-06-04 Thread sonal gupta
Thanks ashish.I'll try it. On Monday, June 4, 2012 8:51:06 PM UTC+5:30, ashish wrote: > > Sub text_clean() > Application.DisplayAlerts = False > Application.Calculation = xlCalculationManual > Dim cell As Range > Dim str As String, text1 As String > For Each cell In Selection > str = "" > text1 =

Re: $$Excel-Macros$$ Text Cleaning

2012-06-04 Thread sonal gupta
Thanks rajan, but i'm new to macros..can you please explain the use of "COD" in this. On Monday, June 4, 2012 8:51:52 PM UTC+5:30, Rajan_Verma wrote: > Try this : > > > > Public Function RemoveSpecialCharacters(Shname As String) As String > > Dim Cod As Integer > > Dim ShN As String > >

RE: $$Excel-Macros$$ Text Cleaning

2012-06-04 Thread Rajan_Verma
Try this : Public Function RemoveSpecialCharacters(Shname As String) As String Dim Cod As Integer Dim ShN As String For i = 1 To Len(Shname) Cod = Asc(Mid(Shname, i, 1)) If (Cod > 47 And Cod < 58) Or (Cod > 64 And Cod < 91) Or (Cod > 96 A

Re: $$Excel-Macros$$ Text Cleaning

2012-06-04 Thread ashish koul
Sub text_clean() Application.DisplayAlerts = False Application.Calculation = xlCalculationManual Dim cell As Range Dim str As String, text1 As String For Each cell In Selection str = "" text1 = "" str = cell.Text For i = 1 To Len(str) If (Asc(Mid(str, i, 1)) > 64 And Asc(Mid(str, i, 1)) < 90) Or (A