Create folder according to EXCEL list

Solved/Closed
HibikiKun Posted messages 98 Status Membre -  
 Efrancoue -
Hello,

I've done some research on Google but without success.
Basically:
I have an Excel table with a single column and about 150 rows, each cell contains a name.
And I would like to create a folder for each cell named after the content of the cell, so about 150 cells.

If anyone has any idea on how to automate this, I would be very grateful.

Thank you
Configuration: Windows Vista Firefox 3.0.3

7 réponses

HibikiKun Posted messages 98 Status Membre 19
 
Thank you, it works!!

Just a small modification:

Sub create_folders()
On Error Resume Next
Dim row As Byte, counter As Byte
row = Range("A65536").End(xlUp).Row
For counter = 1 To row
MkDir "C:\dossiers"
MkDir "C:\dossiers\" & Cells(counter, 1)
Next
End Sub

Otherwise, it didn't know where to create them.
13
Efrancoue
 
Thank you, it's working really well.
0