PC Review


Reply
Thread Tools Rate Thread

create multiple folders and name them by cells in a column excel vba

 
 
sseyerle
Guest
Posts: n/a
 
      11th Dec 2008
I have a workbook with student information. I want to grab each last
name to name folders where thier files can be stored. there are about
1000 names, some are repeats (ex adams, mike and adams, jeff).
can this be done?
 
Reply With Quote
 
 
 
 
Bernie Deitrick
Guest
Posts: n/a
 
      11th Dec 2008
sseyerle,

I would use full names, just for clarity - but, in any case, paste this code
into a regular codemodule of a new workbook, save the workbook into the
parent folder where you want all the new folders, select the cells with your
desired folder names and run this macro.

HTH,
Bernie
MS Excel MVP

Sub MakeFolders()
Dim myC As Range
On Error GoTo FolderExists
For Each myC In Selection
MkDir ThisWorkbook.Path & "\" & myC.Value
ResumeHere:
Next myC
Exit Sub
FolderExists:
Resume ResumeHere
End Sub


"sseyerle" <(E-Mail Removed)> wrote in message
news:6461ac5a-7e08-4c48-b308-(E-Mail Removed)...
>I have a workbook with student information. I want to grab each last
> name to name folders where thier files can be stored. there are about
> 1000 names, some are repeats (ex adams, mike and adams, jeff).
> can this be done?



 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
how do I create multiple column width in the same column in excel =?Utf-8?B?VmlzaA==?= Microsoft Excel Misc 9 3rd Nov 2006 11:49 PM
Access/Excel: Create multiple Lines/Column out of one mulit-line Column? Julian Microsoft Excel Discussion 2 28th Feb 2006 04:06 PM
How do I create multiple columns from a one-column list in Excel? =?Utf-8?B?TWVsaXNzYQ==?= Microsoft Excel Worksheet Functions 5 5th Oct 2005 03:32 AM
How do I create an IF function to hide cells in column B IF cells. =?Utf-8?B?bmx3Mg==?= Microsoft Excel Programming 1 25th Oct 2004 06:43 PM
How do I create an IF function to hide cells in column B IF cells. =?Utf-8?B?bmx3Mg==?= Microsoft Excel Programming 0 25th Oct 2004 06:39 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:04 AM.