From: primed on
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
From: Rick Rothstein on
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" <primed(a)discussions.microsoft.com> wrote in message
news:EFB861D5-0794-4872-9E8A-2E02DCA267BC(a)microsoft.com...
> 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

From: Jacob Skaria on
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
From: primed on
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