Creating a folder with excel

steen37 Posted messages 10 Status Member -  
steen37 Posted messages 10 Status Member -
Hello,

Starting from an Excel file listing a single column of names, I would like to create a folder for each name where I will put photos, etc.
Thank you for your help.

5 answers

  1. regcal Posted messages 13011 Registration date   Status Contributor Last intervention   4 659
     
    Hello,

    You need to create a macro, see example: https://www.youtube.com/watch?v=WGk0Q_G_Z08
    0
    1. steen37 Posted messages 10 Status Member
       
      Thank you for this quick response, the problem is that I don’t even know what a macro is!
      0
    2. steen37 Posted messages 10 Status Member > regcal Posted messages 13011 Registration date   Status Contributor Last intervention  
       
      I need a complete example from A to Z and I should be able to do it, right?
      Where should I send a test file?
      0
    3. regcal Posted messages 13011 Registration date   Status Contributor Last intervention   4 659
       
      Put your example on the cijoint site and put the link here and wait for someone to come by to help you.
      0
    4. steen37 Posted messages 10 Status Member > regcal Posted messages 13011 Registration date   Status Contributor Last intervention  
       
      Je suis désolé, mais je ne peux pas ouvrir ou traiter des fichiers. Vous pouvez copier le texte que vous souhaitez traduire ici et je vous aiderai avec la traduction.
      0
  2. steen37 Posted messages 10 Status Member
     
    0
    1. regcal Posted messages 13011 Registration date   Status Contributor Last intervention   4 659
       
      Yes, you also need to specify what exactly you want to do so that someone can show you how to do it.
      0
    2. steen37 Posted messages 10 Status Member
       
      I just want to create empty folders using the name of each line. One folder per name.
      0
  3. regcal Posted messages 13011 Registration date   Status Contributor Last intervention   4 659
     
    So if a good soul can help Steen37 show him how to make this macro, thank you in advance.
    0
    1. steen37 Posted messages 10 Status Member
       
      thank you
      0
  4. Aliboron Martin Posted messages 3662 Registration date   Status Contributor Last intervention   992
     
    Which version of Excel is it about? What level of update? On which version of Mac OS X?

    --
    Hello at your place!
    Bernard
    0
    1. steen37 Posted messages 10 Status Member
       
      VERSION 14.7.2 for Excel
      MacOS Sierra 10.12.6
      0
  5. Aliboron Martin Posted messages 3662 Registration date   Status Contributor Last intervention   992
     
    You should currently be on version 14.7.6.

    That said, to create folders on the desktop with the names contained in cells A1:A3, you can use the following macro:

    Sub AutreTest()

    Lines = 3 ' last line of the range to process
    For i = 1 To Lines
    FolderName = Worksheets("Sheet1").Range("A" & i).Value
    MyScript = "tell application " & Chr(34) & "Finder" & Chr(34) & Chr(13) & _
    "do shell script ""mkdir -p "" & quoted form of posix path of (" & _
    Chr(34) & "/Users/YourShortName/Desktop/" & FolderName & Chr(34) & ")" & _
    Chr(13) & "end tell"
    On Error Resume Next
    MacScript (MyScript)
    On Error GoTo 0

    Next i

    End Sub

    Of course, this needs to be adapted to your specific needs (if your range is A6:A42, you need to start reading at 6 and not at 1, and the value of the Lines variable should be 42 and not 3 - if you don't want to create the folders on the desktop, you need to adapt the path, etc.)

    Hello at your place!
    Bernard
    0
    1. steen37 Posted messages 10 Status Member
       
      Thank you, I will try to get my bearings.
      0