Public Sub GPE()
Dim I As Long, Arr, Path As String, NewWb, Wb
Dim Dic, Tem As String, Bp As String, Rng As Range
Application.DisplayAlerts = False
Application.ScreenUpdating = False
Set Wb = ActiveWorkbook
Path = ThisWorkbook.Path
With Wb.Sheets(1)
Set Rng = .Range("A3", .[A65000].End(3)).Resize(, 16)
Set Dic = CreateObject("scripting.dictionary")
Arr = .Range("B4", .[B65000].End(3)).Value
For I = 1 To UBound(Arr)
Tem = Arr(I, 1)
If Tem <> Empty And Not Dic.exists(Tem) Then
Dic.Add Tem, ""
Bp = Tem
Set NewWb = Workbooks.Add
Rng.AutoFilter 2, Bp
.Range("A1", Rng).SpecialCells(12).Copy
With NewWb
.Sheets(1).[A1].PasteSpecial xlPasteValues
.Sheets(1).[A1].PasteSpecial xlPasteFormats
.Sheets(1).Columns("A").Resize(, 16).AutoFit
.Sheets(1).Name = Bp
.SaveAs Filename:=Path & "\" & Bp & ".xlsx"
.Close True
End With
End If
Next I
.Activate
.AutoFilterMode = False
End With
Application.CutCopyMode = False
Application.DisplayAlerts = False
Application.ScreenUpdating = True
End Sub