![]() |
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 |
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 |
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 |
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 |
All times are GMT +1. The time now is 01:28 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com