title: Generate full folder structure (topfolders, subfolders, subsubfolder, etc) via excel
body: <p>I have searched all over and tried a lot of different VBA code - no luck so far.</p>
  
  <p><strong>Problem:</strong></p>
  
  <p>Extremely long list of "folders to be created" written in Excel. All folders and subfolder names are listed in the same column in subsequent rows. Another column defines if it is a subfolder or not. Like this</p>
  
  <pre><code>Folder name      Folder level
  A                1
  B                1
  C                2
  D                3
  E                3
  F                2
  G                3
  H                4
  </code></pre>
  
  <p><strong>Solution:</strong></p>
  
  <p>Code that can either (preferable) create the folder structure based on the existing numbering or (alternative) code that can create the folder structure based on columns, i.e. I can move the folder names around so that all sub folders are in column B, subsubfolders in column C, etc. I would prefer be able to leave cells empty so that I do not have repeat the names of all topfolders. I.e. I would prefer (for the alternative solution) to be able use something like this:</p>
  
  <pre><code>Folder Level 1   Folder level 2   Folder Level 3  Folder Level 4
  A
  B                
                   C
                                D                
                                    E                
                   F                
                                    G
                                                     H
  </code></pre>
  
  <p>I do hope that some of you can help. I am very new to VBA so doing the coding myself is out of the question.</p>