Creating Folders and Sub-Folders Using Excel VBA - A Step-by-Step
Creating Folders and Sub-Folders Using Excel VBA - A Step-by-Step
Excel 10 Tutorial
3 0 J A N U A RY AT 1 8 : 3 0
You know, it's tough to solve excel problems and create tutorials on it. It takes a lot of
time & effort. Without your support, it becomes more challenging. Please take a
moment and think about it.
If you can, please support the channel, so I can keep this channel running and
provide different solutions for Excel-related problems. Thanks a Million, in advance.
I'm counting on you.
Sub CreateFolders()
For i = 1 To ActiveSheet.UsedRange.Rows.Count
'Get the main folder name from first cell of the current row
Become a1).Value
mainFolder = mainFolder & ActiveSheet.Cells(i, patron
Skip navigation
'Check if the main folder does not exist
Log in
If Len(Dir(mainFolder, vbDirectory)) = 0 Then
MkDir mainFolder
End If
'Get the range of subfolder names from the rest of the cells in the current row
subFolder = cell.Value
End If
End If
Next cell
Next i
End Sub
3
videos
Recent Posts
Currency: USD
Careers Developers
Brand Blog
Become a patron
Partners
Skip navigation Community Guidelines