I have about 100 tab-delimited data files. All are the same number of columns, but different lengths (rows). All are in one directory (call it C:data). The file name is the date and time (140914-074512.dat). I would like to import them to a single Excel workbook, each file on a different sheet with data beginning at cell G3, with the file name (minus .dat extension) in cell A1 and as the sheet name. (Leave a place holder in the macro where I can write a sub that analyzes the data and places sums and notes in row A of each sheet.) Then add a summary sheet with the contents of A1 - Z1 of each sheet in consecutive rows (100 rows for 100 sheets).
I have written some macros, but I'm not very good at it. I usually need to start with something close from a message board, then figure out what changes to make. I hacked together a macro that almost worked (very ugly by the time I was done with it), but it has been difficult to get the file name as the sheet name (something about real sheet name vs. internal name?) and the correct file name imported into cell A1 (not sure how Excel picks the next file in a directory). Getting Excel to add the summary sheet is also beyond my limited ability. Any help would be appreciated. Thanks!
I have written some macros, but I'm not very good at it. I usually need to start with something close from a message board, then figure out what changes to make. I hacked together a macro that almost worked (very ugly by the time I was done with it), but it has been difficult to get the file name as the sheet name (something about real sheet name vs. internal name?) and the correct file name imported into cell A1 (not sure how Excel picks the next file in a directory). Getting Excel to add the summary sheet is also beyond my limited ability. Any help would be appreciated. Thanks!