Open multiple text files to different sheets and save each sheet seperately

lance01

New Member
Joined
Dec 12, 2013
Messages
15
Hi Excel gurus,
I've been pulling my hair out trying to do a potentially easy code for some experienced people, if anyone can help!

I'm looking to :

1) Open multiple file names from my F drive.
Details - With the file name of "issue303661.txt" the following file would typically be consectuive e.g "issue 303662.txt" but not necessarily.
Is there a way to have a simple macro that opens all text files in F drive no matter the name and inserts each text file into different worksheets that are space delaminated.

2) Renames each sheet to a specific cell
Details - in this case ("G4") of each sheet.

3) I have some code to manipulate the data

4) Save each sheet as a separate file
Details - Save each sheet back to the F: drive. Each sheet would be saved as the name from cell ("G4").txt or .csv.
I have previously been using the print# feature as I wanted to save the file with space delimited and I had some commas that came out as "," which would not work in an already existing macro. If not a simple save may be possible.

Thanks for your time in advance people.

Lance
 

Excel Facts

What is the last column in Excel?
Excel columns run from A to Z, AA to AZ, AAA to XFD. The last column is XFD.

Forum statistics

Threads
1,215,532
Messages
6,125,363
Members
449,221
Latest member
chriscavsib

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top