Re: $$Excel-Macros$$ Delete extra information from a cell

2011-03-02 Thread CAN
Thank you very much. This works perfectly. You guys are great!!! On Mar 2, 4:13 am, siti Vi wrote: > please test if it helps > > Sub BlaBlaBla() >    'siti Vi / jakarta, 2 mar 2011 >    Dim Dat As Range, r As Long, c As Integer >    Set Dat = Sheets(1).Cells(1).CurrentRegion >    For r

Re: $$Excel-Macros$$ Delete extra information from a cell

2011-03-02 Thread Paul Schreiner
Str(1, Str, " 12 "))     End If     R = R + 1     Sheets("Sheet1").Cells(R, 1).Value = Str     Loop     ft.Close     End If End Sub '--- Paul ____________ Fr

Re: $$Excel-Macros$$ Delete extra information from a cell

2011-03-02 Thread siti Vi
please test if it helps Sub BlaBlaBla() 'siti Vi / jakarta, 2 mar 2011 Dim Dat As Range, r As Long, c As Integer Set Dat = Sheets(1).Cells(1).CurrentRegion For r = 1 To Dat.Rows.Count c = InStr(1, Dat(r, 1), " 12 $", vbTextCompare) - 1 Dat(r, 2) = Left(Dat(r, 1), c) Next

$$Excel-Macros$$ Delete extra information from a cell

2011-03-01 Thread CAN
I have a .CSV file that contains all the data in column A. Each row has different information. I am looking for macro that will review the data on each row and whenever find the number "12" it will delete it along with all the information after. For example see data below 1 MF2-001 B Y MILAGROS