Geekzone: technology news, blogs, forums
Welcome Guest.
You haven't logged in yet. If you don't have an account you can register now.

2 posts

Wannabe Geek

Topic # 13798 30-May-2007 02:51
Send private message

I have a list of about 3,000 customers in an excel spreadsheet.  i need a program that will read each name and create a folder with that name.

[Moderator edit (MF): moved to desktop forum]

Create new topic
122 posts

Master Geek

  Reply # 72787 30-May-2007 04:00
Send private message

Hey Anna,

I don't know of any existing programs that will do this for you. However, you can create a macro to do this yourself. Just follow the steps below. This was tested briefly in Excel 2003 & seems to work.

1) Go to Tools > Macro > Record New Macro
2) Name it 'CreateFolders' & click OK
3) Click the little square to 'stop recording'
4) Go to Tools > Macro > Macros...
5) Select the 'CreateFolders' macro & click 'Edit' (will open a new Editor window)
6) Replace the existing text with the text below, so it now looks like this:

Sub CreateFolders()
    Dim outputFolder As String
    outputFolder = "C:\newFolders"
    MkDir (outputFolder)
    For Each cell In Selection
        Dim path As String
        path = outputFolder & "\" & cell.Value
        Application.StatusBar = "Creating folder '" & path & "'"
        MkDir (path)
    Application.StatusBar = "Finished creating folders in '" & outputFolder & "'."
End Sub

7) Click the disk icon to save, then close the editor window.
8) Select the cells you want to make into folders i.e. the list of customer names.
9) Go to Tools > Macro > Macros...
10) Select the 'CreateFolders' macro & click 'Run'

If all is well, your new folders should have been created here: C:\newFolders. All that remains is to move them to wherever you really want them.

Hope this helps. Laughing

2 posts

Wannabe Geek

  Reply # 72797 30-May-2007 08:30
Send private message

that worked perfectly!  thank you

122 posts

Master Geek

Reply # 72898 30-May-2007 20:57
Send private message

Of course it did. I'm a genius. Wink

Glad to have helped.

Create new topic

Twitter »

Follow us to receive Twitter updates when new discussions are posted in our forums:

Follow us to receive Twitter updates when news items and blogs are posted in our frontpage:

Follow us to receive Twitter updates when tech item prices are listed in our price comparison site:

Geekzone Live »

Try automatic live updates from Geekzone directly in your browser, without refreshing the page, with Geekzone Live now.

Are you subscribed to our RSS feed? You can download the latest headlines and summaries from our stories directly to your computer or smartphone by using a feed reader.

Alternatively, you can receive a daily email with Geekzone updates.