+ Reply to Thread
Results 1 to 10 of 10

Creating folders with name as cell values

  1. #1
    Forum Contributor
    Join Date
    02-19-2013
    Location
    UK
    MS-Off Ver
    Excel 2019
    Posts
    677

    Creating folders with name as cell values

    Hi all,
    I have following code which works fine to create folder.
    I want to include columns A, B, C as name of the file from Range A2 down and if folder is already created then it will not duplicate it.
    I am planning to incorporate this code while file is opened or assign it to userform submit button
    Need some help please.
    Please Login or Register  to view this content.
    many thanks
    Kind regards

  2. #2
    Forum Expert Olly's Avatar
    Join Date
    09-10-2013
    Location
    Darlington, UK
    MS-Off Ver
    Excel 2016, 2019, 365
    Posts
    6,284

    Re: Creating folders with name as cell values

    Try:
    Please Login or Register  to view this content.
    let Source = #table({"Question","Thread", "User"},{{"Answered","Mark Solved", "Add Reputation"}}) in Source

    If I give you Power Query (Get & Transform Data) code, and you don't know what to do with it, then CLICK HERE

    Walking the tightrope between genius and eejit...

  3. #3
    Forum Contributor
    Join Date
    02-19-2013
    Location
    UK
    MS-Off Ver
    Excel 2019
    Posts
    677

    Re: Creating folders with name as cell values

    Hi Olly,
    Thanks for a prompt reply.
    -It still takes values from Row1 to 4 and creates 4 folders, as I want to create 1 folder taking values from 1 to 3.
    -It needs to take values from row 2 on wards down ( 1 to 3)
    And Following goes to debug
    fso.CreateFolder (xdir)
    We are almost there
    Thanks
    Kind regards

  4. #4
    Forum Contributor
    Join Date
    02-19-2013
    Location
    UK
    MS-Off Ver
    Excel 2019
    Posts
    677

    Re: Creating folders with name as cell values

    Please Login or Register  to view this content.
    Sorry forgot code tags

  5. #5
    Forum Contributor
    Join Date
    02-19-2013
    Location
    UK
    MS-Off Ver
    Excel 2019
    Posts
    677

    Re: Creating folders with name as cell values

    Sorry again I stand corrected
    It still takes values from COLUMNS1 to 4 and creates 4 folders, as I want to create 1 folder taking values from 1 to 3.

  6. #6
    Forum Expert Olly's Avatar
    Join Date
    09-10-2013
    Location
    Darlington, UK
    MS-Off Ver
    Excel 2016, 2019, 365
    Posts
    6,284

    Re: Creating folders with name as cell values

    Sorry, I'm now even less clear on your requirement.

    Can you attach an example workbook, and show what your required output (folders) would be...

  7. #7
    Forum Contributor
    Join Date
    02-19-2013
    Location
    UK
    MS-Off Ver
    Excel 2019
    Posts
    677

    Re: Creating folders with name as cell values

    Hi apology for bit confusing. It happens some times.
    Really appreciate your help.
    I have attached the sample workbook
    Kind regards
    Attached Files Attached Files

  8. #8
    Forum Expert Olly's Avatar
    Join Date
    09-10-2013
    Location
    Darlington, UK
    MS-Off Ver
    Excel 2016, 2019, 365
    Posts
    6,284

    Re: Creating folders with name as cell values

    Better

    Use:
    Please Login or Register  to view this content.
    Note that you can't use either / or \ in a file or folder name, so I've formatted your dates as dd-mm-yyyy.

    Last edited by Olly; 04-04-2014 at 03:49 PM. Reason: oops - changed my dev folder path!

  9. #9
    Forum Contributor
    Join Date
    02-19-2013
    Location
    UK
    MS-Off Ver
    Excel 2019
    Posts
    677

    Re: Creating folders with name as cell values

    Hi Olly,
    Perfect solution mate.
    You made my day. I have understood it now.
    Many Thanks
    Kind Regards

  10. #10
    Forum Expert Olly's Avatar
    Join Date
    09-10-2013
    Location
    Darlington, UK
    MS-Off Ver
    Excel 2016, 2019, 365
    Posts
    6,284

    Re: Creating folders with name as cell values

    Glad you're sorted! Thanks for the feedback

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Automatically create hyperlink in active cell when creating folders
    By XxCMoneyxX in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 05-06-2013, 12:04 PM
  2. creating sub folders
    By w8itn4you in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-06-2012, 07:01 PM
  3. [SOLVED] Creating Folders and Sub Folders
    By qoios in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 10-30-2012, 12:57 PM
  4. Creating Folders based on cell values
    By vbwanab in forum Excel Programming / VBA / Macros
    Replies: 21
    Last Post: 06-19-2011, 05:16 AM
  5. probems creating folders: "......... folders already existed"
    By AnthonyWB in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-12-2010, 03:04 PM

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