Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default create multiple folders and name them by cells in a column excel vba

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?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,441
Default create multiple folders and name them by cells in a column excel vba

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
ResumeHe
Next myC
Exit Sub
FolderExists:
Resume ResumeHere
End Sub


"sseyerle" wrote in message
...
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
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Create Multipe folders and naming them by Cells in Columns using vba sseyerle Excel Programming 3 December 11th 08 07:44 PM
Can excel automatically create folders Can excel automatically create folders Excel Discussion (Misc queries) 1 June 23rd 08 09:38 PM
Create folders from excel Boss Excel Programming 2 March 7th 08 03:46 PM
Create Folders From Excel WBTKbeezy Excel Programming 4 November 28th 07 03:07 PM
how do I create multiple column width in the same column in excel Vish Excel Discussion (Misc queries) 9 November 3rd 06 11:49 PM


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

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"