Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Text files from Excel 3

Status
Not open for further replies.

swamit

Technical User
Jan 9, 2002
16
US

Hello all,

A problem for me probably easy for you folks.

I have a list of names in Column A in an Excel file - several hundred names.

I want to create a notepad file for each of those names. So in essence, create a notepad file and save it with value from cell A1 - create another one and save it with value from cell A2...and so on....

Is there any easy way to do rather than a manual option ?

Please help.
Thanks
 
You could use a fancy macro, but all you really need to do is:

1. Put this formula in B1 and copy down all rows:
[blue]
Code:
="Copy blank.txt "&A1&".txt"
[/color]

2. Then copy and paste special values to turn it in to pure text. (Actually you could leave out this step.)

3. Select column B and copy then paste into a blank "notepad file" with a name like "gofiles.bat"

4. Create an almost blank "notepad file" with the name "blank.txt" -- you need at least one character in the file or it won't be copied.

5. Run the gofiles.bat file (double-click from explorer)

 
Sorry, you should use this formula in column B to allow for imbedded spaces in the names:
[blue]
Code:
   ="Copy blank.txt """&A1&".txt"""
[/color]


 

Zathras,
Right on man....Thanks a lot...this was a fairly simple fix for what I thought would be a mountain of work....

I had 2016 records....!!!


Thanks a bunch....
 
How the heck did you come up with that neat trick?

Even if I never use it, it's worth a STAR!!
 
I guess I'm just showing my age. Back in the days before Windows, DOS was king. Writing .bat files became sort of an art form.

It's kind of nice that the old tricks still work. (Especially since it's getting harder and harder to learn the new ones!)
[LOL]

 
Not quite. (But then I'm not retired like some I know, YET!) It was however MSDOS 1.1 on an original IBM PC (green screen and all -- Hercules hadn't been heard from yet.) And of course nothing but 360 Kb 5 1/4" floppies.

Disk drives? We didn't need no stinkin' disk drives! Those came a couple of years later.

 
I still have my IBM PC 4.33 Mhz with DOS 1.1 (1982) and 2 360 floppy's and it came with the complete command set!

I still use DOS Batch files for crazy things like concatenating files but didn't realize I could stuff this into an Excel formula.

Thanks again
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top