+ Reply to Thread
Results 1 to 18 of 18

Can Excel create folders?

  1. #1
    Registered User
    Join Date
    10-18-2007
    Posts
    89

    Lightbulb Can Excel create folders?

    I am wondering if it is possible to get excel to Create a new folder from a cell value? I am entring data into cells Eg A1-F1, and then the next line of data is in A2-F2 and so on. What I'd like is when I enter data (the date) in the F column then it will create a folder with the value of H2 (=A2&B2&D2&E2)

    Is this possible?

  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

    Re: Can Excel create folders?

    Hello jamesstorx,

    If you mean is it possible to create a folder using a worksheet formula then the answer is no. It is possible using VBA.
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

  3. #3
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Can Excel create folders?

    See http://www.excelforum.com/excel-prog...subfolder.html
    Entia non sunt multiplicanda sine necessitate

  4. #4
    Registered User
    Join Date
    10-18-2007
    Posts
    89

    Re: Can Excel create folders?

    I don't completely understand this. I have attached what I am working with. I am trying to name the folder as seen in "H".

    Thanks for all the help. I know us noobs can be frustrating.
    Attached Files Attached Files

  5. #5
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Can Excel create folders?

    You want to create all the directories in col H?

    In what folder?

  6. #6
    Registered User
    Join Date
    10-18-2007
    Posts
    89

    Re: Can Excel create folders?

    Quote Originally Posted by shg View Post
    You want to create all the directories in col H?

    In what folder?
    Only the new ones. I tried using "activecell.value" but I can't seem to get it to work. I got it to creat a new folder, but the name was "Activecell.value" instead of the actual value of the cell. The folders will be moved after the files get put in them, so the macro will not be able to search for them, unless it searched my entire server.

  7. #7
    Forum Expert Palmetto's Avatar
    Join Date
    04-04-2007
    Location
    South Eastern, USA
    MS-Off Ver
    XP, 2007, 2010
    Posts
    3,978

    Re: Can Excel create folders?

    In what folder?
    I think SHG means:
    • My Documents
    • C:\
    • C:\Temp
    • X:\Whatever

    Where is the root folder in which to create the new subfolders?

  8. #8
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Can Excel create folders?

    Quote Originally Posted by Palmetto View Post
    I think SHG means: ...
    Exactly, thank you.

  9. #9
    Registered User
    Join Date
    10-18-2007
    Posts
    89

    Re: Can Excel create folders?

    Quote Originally Posted by shg View Post
    Exactly, thank you.
    Sorry, They will all go into "P:\"

  10. #10
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Can Excel create folders?

    Run Sub x. Untested ...
    Please Login or Register  to view this content.

  11. #11
    Registered User
    Join Date
    10-18-2007
    Posts
    89

    Re: Can Excel create folders?

    How can I get it to only create the new folders? this works great, but copies all the folders. would it be best to delete H after running the program each time?

    You guys truly amaze me. In 5 minutes you can get done what has taken me all day to not get done.

    Thanks.

  12. #12
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Can Excel create folders?

    It only does create the folders that do not already exist.

  13. #13
    Registered User
    Join Date
    10-18-2007
    Posts
    89

    Re: Can Excel create folders?

    Quote Originally Posted by shg View Post
    It only does create the folders that do not already exist.
    But if I move the new folder into another sub-folder then it will be duplicated.

  14. #14
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Can Excel create folders?

    If what you mean is ...

    You create the directories in P:\

    Then you then move those directories into some other directory, e.g., P:\somplaceElse\

    Then you create the directories again in P:\

    .. then yes, of course, there will be two directories having the same name in different directories. There are not duplicates, they are different directories.

  15. #15
    Registered User
    Join Date
    10-18-2007
    Posts
    89

    Re: Can Excel create folders?

    Is there a way that I can only have it do it once?

  16. #16
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Can Excel create folders?

    Probably, if you explain clearly what you're trying to do.

  17. #17
    Registered User
    Join Date
    10-18-2007
    Posts
    89

    Re: Can Excel create folders?

    I want to have excel create the folder, in P:\. Then I will move the folder into an appropriate subfolder based on the contents of the folder. I need to only have the folders created once, and I my understanding is that once the folder is moved it will be made again because it no longer resides in P:\.

    I am sorry if my inexperience is making this diffucult. I really do appreciate all your help.

    Thanks again.

  18. #18
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Can Excel create folders?

    I am sorry if my inexperience is making this diffucult. I really do appreciate all your help.
    You're welcome, and people wouldn't post here if they knew how to do what they wanted.

    I want to have excel create the folder, in P:\. Then I will move the folder into an appropriate subfolder based on the contents of the folder. I need to only have the folders created once, and I my understanding is that once the folder is moved it will be made again because it no longer resides in P:\.
    That's correct.

    So just run the code once. I know that's not the answer, but still don't understand what you're trying to do.

    Draw a directory tree after the code runs once:
    Please Login or Register  to view this content.
    Then another after you move stuff around; then another showing what you want to happen after the code runs again.

+ 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