Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 23
Default Creating folder names from column data in excel

Hi,

I have a list of names in excel, approx 500 long. I need to create a folder
for each one. How do i do it automatically?

Thanks
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,934
Default Creating folder names from column data in excel

You would use the MkDir statement to do that... it requires you specify the
full path as its argument. This is the description provided in the help
files...

"Creates a new directory or folder.

Syntax: MkDir path

The required path argument is a string expression that
identifies the directory or folder to be created. The path
may include the drive. If no drive is specified, MkDir
creates the new directory or folder on the current drive."

--
Rick (MVP - Excel)


"primed" wrote in message
...
Hi,

I have a list of names in excel, approx 500 long. I need to create a
folder
for each one. How do i do it automatically?

Thanks


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8,520
Default Creating folder names from column data in excel

Try the below

Sub Macro()
Dim cell As Range
For Each cell In Range("A1:A500")
MkDir "c:\" & cell.Text
Next
End Sub


--
Jacob


"primed" wrote:

Hi,

I have a list of names in excel, approx 500 long. I need to create a folder
for each one. How do i do it automatically?

Thanks

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 23
Default Creating folder names from column data in excel

Excellent, Thankyou.

I had to try it a few times as the list contained data that went against
file naming conventions.

Thanks



"Jacob Skaria" wrote:

Try the below

Sub Macro()
Dim cell As Range
For Each cell In Range("A1:A500")
MkDir "c:\" & cell.Text
Next
End Sub


--
Jacob


"primed" wrote:

Hi,

I have a list of names in excel, approx 500 long. I need to create a folder
for each one. How do i do it automatically?

Thanks

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Match file names listed in column with file names in folder K[_2_] Excel Programming 1 March 16th 09 04:26 PM
How to List the names of the subfolders present in the folder (path of folder is given in the textbox by user ) divya Excel Programming 3 November 30th 06 11:34 AM
I need an excel sheet to creating a new folder every month, and save a new spreadsheet every day, untill the next month, when it creates a new folder Sol[_3_] Excel Programming 1 September 6th 06 06:50 PM
Obtain folder names in a excel sheet furbiuzzu Excel Programming 1 May 5th 06 07:02 PM
Change names of files in a folder to match names in Excel Column saybut Excel Programming 4 February 9th 04 06:26 PM


All times are GMT +1. The time now is 12:05 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"