Convert Excel Cells to Different Notepad Files

TootingPopular

New Member
Joined
Oct 18, 2012
Messages
2
Hi, I have an Excel file with 2 Columns and 1001 Rows.
Row 1 contains the Column Headers:
A1 = Name, B1 = CV
A2 is the person's name e.g. John Smith.
B2 is the whole of their Curriculum Vitae (just in text form).
And so on A3, B3 ... A1001, B1001, a thousand names and a thousand CVs.
I need these as 1000 unique Notepad files e.g. called John Smith.txt.
Manually this would be copy and paste B2 into Notepad, Save as A2.txt, repeat for each Row.
But it'll take ages. Is there a way to do it automatically. I have no programming or macro skills, but I'd be v grateful for some instructions. Many, many thanks if you can help.
 

Excel Facts

Is there a shortcut key for strikethrough?
Ctrl+S is used for Save. Ctrl+5 is used for Strikethrough. Why Ctrl+5? When you use hashmarks to count |||| is 4, strike through to mean 5.
Hi

Not very tidy but it works.

Change the path to a suitable one and it should exist already. Creates Text file with persons name from column A and file content from column B

Code:
Sub Create_txt()
Set Rng = Range(Range("A1"), Range("A" & Rows.Count).End(xlUp))
Path = "C:\junk\"
For Each cell In Rng
cell.Activate
Nme = cell.Value
cv = cell.Offset(0, 1).Value

    Open Path & Nme & ".txt" For Output As #1
    Print #1, cv
    Close #1
    Next
End Sub
 
Upvote 0

Forum statistics

Threads
1,216,079
Messages
6,128,687
Members
449,464
Latest member
againofsoul

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