Hello World-

This is my first post so please excuse any best practices I do not conform to.

I need a macro to Convert multiple .txt text files (all files are in one folder, but bonus points to a solution that accounts for files in sub-folders) to be excel files. As each file is created I need a record count to appear in 1 new excel document where column A is file name and column b is record count from the file that is converted from text to excel. I also need all of the columns in the converted txt to excel files to be in format text, save for one column which needs to be general format.

I used the macro recorder but it was only for one file so does not account for selecting multiple files. Also does not do a record count in a seerate excel sheet.

Please help excel forum users!


Here is the macro recorded code
Workbooks.OpenText Filename:= _
        "C:\Users\me\Desktop\test.txt" _
        , 
///I changed my file path to protect the innocent 
Origin:=xlWindows, StartRow:=1, DataType:=xlDelimited, TextQualifier _
        :=xlDoubleQuote, ConsecutiveDelimiter:=False, Tab:=False, Semicolon:= _
        False, Comma:=False, Space:=False, Other:=True, OtherChar:="º", _
        FieldInfo:=Array(Array(1, 2),

///I removed array’s for a more general example and will not provide the arrays generated.

TrailingMinusNumbers:=True
End Sub