Hi,
The current code I have makes a directory named the current criteria, but please can you show me how to loop through each autofilter value and create a directory for each one?
Many thanks.
The current code I have makes a directory named the current criteria, but please can you show me how to loop through each autofilter value and create a directory for each one?
Many thanks.
Code:
Sub CreateBranchDirectories()
' Get Current Criteria
With ActiveSheet
If .AutoFilterMode Then
With .AutoFilter.Filters(1)
If .On Then c1 = .Criteria1:
End With
End If
End With
' c1 = Current Criteria (Replace "=")
c1 = Replace(c1, "=", "")
' Make Directories
MkDir "Y:\Directories\" & c1
End Sub