+ Reply to Thread
Results 1 to 5 of 5

List of Folders

  1. #1
    Registered User
    Join Date
    02-15-2006
    Posts
    93

    List of Folders

    Good morning all,

    I have an excel file that I am using to create an index. What I want to do is have excel list all of the folder names that are in the same directory as the excel file. I can get the full path name listed but not just the folder name. Any ideas?

    Thanks in advance,
    tc

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258
    Hello toocold,

    Here is a macro that will list the directory your are searching in cell "A1" of the Active Sheet, and all the folder names in it starting at cell "A2".
    Please Login or Register  to view this content.
    Sincerely,
    Leith Ross

  3. #3
    Forum Expert mrice's Avatar
    Join Date
    06-22-2004
    Location
    Surrey, England
    MS-Off Ver
    Excel 2013
    Posts
    4,967
    This seems to work

    Please Login or Register  to view this content.
    Martin

  4. #4
    Registered User
    Join Date
    02-15-2006
    Posts
    93
    thanks guys, works great

  5. #5
    Forum Expert
    Join Date
    01-15-2007
    Location
    Brisbane, Australia
    MS-Off Ver
    2007
    Posts
    6,591
    Hi

    This will use the currently selected file, and put the output in the file with the macro. That way you don't have to put the macro into the file you are testing....

    Please Login or Register  to view this content.

    rylo

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1