PC Review


Reply
Thread Tools Rate Thread

Creating folder names from column data in excel

 
 
primed
Guest
Posts: n/a
 
      21st Dec 2009
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 With Quote
 
 
 
 
Rick Rothstein
Guest
Posts: n/a
 
      21st Dec 2009
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" <(E-Mail Removed)> wrote in message
news:EFB861D5-0794-4872-9E8A-(E-Mail Removed)...
> 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 With Quote
 
Jacob Skaria
Guest
Posts: n/a
 
      21st Dec 2009
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 With Quote
 
primed
Guest
Posts: n/a
 
      22nd Dec 2009
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 With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Creating tables based on Excel Column data. Achase Microsoft Access External Data 1 30th Sep 2008 04:18 PM
Column Names in Excel to Data in One Column c8tz Microsoft Access Database Table Design 3 17th Aug 2007 04:17 PM
Column Names in Excel to Data in Access c8tz Microsoft Access Getting Started 1 17th Aug 2007 01:38 PM
Import Data - Column names in one column in Excel Major via AccessMonster.com Microsoft Access Queries 1 24th Mar 2006 12:52 AM
Change names of files in a folder to match names in Excel Column saybut Microsoft Excel Programming 4 9th Feb 2004 06:26 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 08:47 PM.