Hello all,
I am trying to create a batch of folders where the code is normally quite simple:
I have several hundred that I regularly make. So far, I just have the same line repeated, but I'm trying to do some sort of loop or check to look for values in a column, and if present create the folder. So far I have tried several variations, and have been unsuccessful, so any help would be greatly appreciated. (My error hits at the "Then" portion as I try to add the Row value to the MkDir)
I am trying to create a batch of folders where the code is normally quite simple:
VBA Code:
MkDir[D3&E3]
VBA Code:
Sub CreateTheMonthlyFolders()
Dim Lastrow As Long: Dim Frow As Long
Sheets("FOLDERStest").Select
Lastrow = ActiveSheet.Range("B" & Rows.Count).End(xlUp).Row
For Frow = 5 To Lastrow
If Range("B" & Frow).Value <> "" Then MkDir [("D"&Frow)&("E"&Frow)] 'normally MkDir[D5&E5]
Next Frow
End Sub