ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Create Multipe folders and naming them by Cells in Columns using vba (https://www.excelbanter.com/excel-programming/421180-create-multipe-folders-naming-them-cells-columns-using-vba.html)

sseyerle

Create Multipe folders and naming them by Cells in Columns using vba
 
Hello,
I have a worsheet where the Last Names will make up a large folder
directory where we will store scanned documents by last name.

I have an excel workbook named "Student Name"
How do I take the 1100 or so names in column A and create empty
folders named by the cells in Column A in a folder named "Test" on the
desktop?

Thank you

Jarek Kujawa[_2_]

Create Multipe folders and naming them by Cells in Columns usingvba
 
select yr names in col A

and use the following macro:

Sub cus()

For Each cell In Selection
MkDir ("C:\Documents and Settings\Desktop\Test\" & cell.Value)
Next cell

End Sub

adjust the path ("C:\Documents and Settings\Desktop\Test\")
accordingly



On 11 Gru, 20:17, sseyerle wrote:
Hello,
I have a worsheet where the Last Names will make up a large folder
directory where we will store scanned documents by last name.

I have an excel workbook named "Student Name"
How do I take the 1100 or so names in column A and create empty
folders named by the cells in Column A in a folder named "Test" on the
desktop?

Thank you



sseyerle

Create Multipe folders and naming them by Cells in Columns usingvba
 
Thank you for the reply
I am getting a runtime error and only some of the folders are being
created?
any ideas

Sub cus()


For Each cell In Selection
MkDir ("C:\Documents and Settings\Ryan\Desktop\Test\" &
cell.Value)
Next cell


End Sub










On Dec 11, 2:30*pm, Jarek Kujawa wrote:
select yr names in col A

and use the following macro:

Sub cus()

For Each cell In Selection
* * * *MkDir ("C:\Documents and Settings\Desktop\Test\" & cell.Value)
Next cell

End Sub

adjust the path ("C:\Documents and Settings\Desktop\Test\")
accordingly

On 11 Gru, 20:17, sseyerle wrote:



Hello,
I have a worsheet where the Last Names will make up a large folder
directory where we will store scanned documents by last name.


I have an excel workbook named "Student Name"
How do I take the 1100 or so names in column A and create empty
folders named by the cells in Column A in a folder named "Test" on the
desktop?


Thank you- Hide quoted text -


- Show quoted text -



Jarek Kujawa[_2_]

Create Multipe folders and naming them by Cells in Columns usingvba
 
don't know
look into yr Last Names, probably some of the names contain characters
that cannot be used in folder names

On 11 Gru, 20:42, sseyerle wrote:
Thank you for the reply
I am getting a runtime error and only some of the folders are being
created?
any ideas

Sub cus()

For Each cell In Selection
* * * *MkDir ("C:\Documents and Settings\Ryan\Desktop\Test\" &
cell.Value)
Next cell

End Sub

On Dec 11, 2:30*pm, Jarek Kujawa wrote:



select yr names in col A


and use the following macro:


Sub cus()


For Each cell In Selection
* * * *MkDir ("C:\Documents and Settings\Desktop\Test\" & cell.Value)
Next cell


End Sub


adjust the path ("C:\Documents and Settings\Desktop\Test\")
accordingly


On 11 Gru, 20:17, sseyerle wrote:


Hello,
I have a worsheet where the Last Names will make up a large folder
directory where we will store scanned documents by last name.


I have an excel workbook named "Student Name"
How do I take the 1100 or so names in column A and create empty
folders named by the cells in Column A in a folder named "Test" on the
desktop?


Thank you- Hide quoted text -


- Show quoted text -- Ukryj cytowany tekst -


- Pokaż cytowany tekst -




All times are GMT +1. The time now is 01:48 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com