Hi, I have one master file where I need to split out and send data to 15 different regions. I've tried to make a macro to automate it by using autofilter and copy to achieve it but I keep getting a Run time Error 1004. I am using Excel 2007, my code below though I cut out the values for the string array. If I step into the code, the error pops up when I get to the filter by criteria line.

Sub SplitFile()
Dim regions(15) As String
regions(0) = "FLORIDA"

For N = LBound(regions) To UBound(regions)
    Set wb = Workbooks.Add
       
    With ThisWorkbook.Sheets("MASTER")
        .Activate
        .AutoFilterMode = False
        .Range("C:BY").AutoFilter
        .Range("C:BY").AutoFilter Field:=3, Criteria:=regions(N)
        .Range("C:BY").SpecialCells(xlCellTypeVisible).Select
        .Range("C:BY").Copy
    End With
    
    With wb
        .Sheet1.Paste
        .SaveAs Filename:="C:\Regional Files\" & regions(N)
        .Close True
    End With
    
    Set wb = Nothing
Next N
End Sub