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
See if you can adapt this: '- Option Explicit Public Const ForReading = 1, ForWriting = 2, ForAppending = 3 Sub ReadData()     Dim fso, ft, Str, CSVFile     Dim R     ThisWorkbook.Activate     Sheets("Sheet1").Select     CSVFile = "C:\temp\vba\Tes

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