$$Excel-Macros$$ Re: List of text files with data to Excel.

2011-09-21 Thread johnofeasttex
Hi Ashish, You are the man!!! This works great! After I had a backup get posted to the wrong location while updating a computer in the shop, our operators suddenly started complaining that thier tables were wrong that they had been manually updating each time they saved thier work. This will all

$$Excel-Macros$$ Re: List of text files with data to Excel.

2011-09-20 Thread johnofeasttex
I also wanted to add that when I scan the contents of the directory that has been updated, I see that the ".txt" has been added to the file name. This is not a problem initialy, but as files are added to the directory and the macro is run again, it adds another ".txt" to the end of the files it

Re: $$Excel-Macros$$ List of text files with data to Excel.

2011-09-20 Thread johnofeasttex
; i = i + 1 > Cells(j, 7).Value = strLine > If i = 3 Then > s = "" > s = Cells(j, 7).Value > Cells(j, 8).Value = Left(Right(s, Len(s) - InStr(s, "(")), Len(Right(s, > Len(s) - InStr(s, "("))) - 1) > Cells(j, 7).Value = Left(s, InStr(s, "("

Re: $$Excel-Macros$$ List of text files with data to Excel.

2011-09-19 Thread johnofeasttex
Can anyone show me how to import the first 2 rows of data from the text file into excel as the following code builds the list? Thank You for ANY help.. John On Sep 16, 2:04 pm, johnofeasttex wrote: > I searched around and found some code that allows me to create a list > of the file

Re: $$Excel-Macros$$ List of text files with data to Excel.

2011-09-16 Thread johnofeasttex
ks.Add Application.SheetsInNewWorkbook = iSheetsInNew Set sh = wb.Sheets(1) Else Set mySh = sh End If With sh Range(.Cells(1, 1), .Cells(UBound(varData, 1) + 1, UBound(varData, 2) + 1)) = varData .UsedRange.Columns.AutoFit End With Set sh = Nothing Set wb = Nothing End Sub This I can modify

Re: $$Excel-Macros$$ List of text files with data to Excel.

2011-09-16 Thread johnofeasttex
After digging around a bit, I found the following code that seems to work fine for getting the file list from a particular directory. I just need to figure out how to pull the data from the comment line in the file. any suggestions? Thanks John On Sep 15, 2:48 pm, johnofeasttex wrote: >

Re: $$Excel-Macros$$ List of text files with data to Excel.

2011-09-15 Thread johnofeasttex
790 SMART CHUCK CAMDEN The ID is always after the letter O. The comment is always between the perentheses. Thanks for looking at it. John On Sep 15, 12:52 pm, NOORAIN ANSARI wrote: > Dear John, > > Please share sample sheet with us > > > > > > On Thu, Sep 15, 2

$$Excel-Macros$$ List of text files with data to Excel.

2011-09-15 Thread johnofeasttex
Hello, I need to look in individual directories of text files and create a list in Excel showing all files in that directory in one column with data from the first row starting with the letter "N" parsed into the adjacent 2 columns. The data will be of various lengths but the format will look like