Solved How i make folders from excel sheet record?

Dell Optiplex 780 small form factor desk...
September 12, 2014 at 19:38:10
Specs: Windows 7, 3/4
I have excel sheet have 300 Names. I need to creat folders with this names in one click.
So, Is there any tools or batch file copy cells name from excel sheet to folders?

See More: How i make folders from excel sheet record?

Report •

September 13, 2014 at 02:30:13
Specify the layout of your Excel sheet.

Report •

September 15, 2014 at 05:24:04
✔ Best Answer
This solution assumes that the names are in column A, starting from A1. You can modify the code to the correct columns in your sheet. You will also need to change "P:\" to the correct folder path.

You can either use F8 then F5 to run the code, or add a button and assign the code to that button.

Private Sub CreateFolders()
    Dim Urange, LRange
    Dim Bcell As Range

    Set Urange = Range("A1")
    Set LRange = Range("A" & Rows.Count).End(xlUp)

    For Each Bcell In Range(Urange, LRange)
        MkDir ("P:\test\" & Bcell.Value)
    Next Bcell
End Sub

Report •
Related Solutions

Ask Question