Sub ExportShts()
Dim Pth As String
Dim Arr As Variant
Dim Sht As Worksheet
Dim ShtDict As Object
Dim Rng As Range
Dim Ky As Variant
Application.ScreenUpdating = False
Pth = ThisWorkbook.Path
Set ShtDict = CreateObject("scripting.dictionary")
For Each Sht In Worksheets
Set Rng = Sht.Range("AA3")
With ShtDict
If Not .Exists(Rng.Text) Then
.Add Rng.Text, Sht.Name
Else:
.Item(Rng.Text) = .Item(Rng.Text) & "|" & Sht.Name
End If
End With
Next Sht
For Each Ky In ShtDict.Keys
If InStr(ShtDict(Ky), "|") > 0 Then
Arr = Split(ShtDict(Ky), "|")
Sheets(Arr).Copy
ActiveWorkbook.Close savechanges:=True, Filename:=Pth & "\" & Ky & ".[COLOR=#0000ff]xlsx[/COLOR]"
End If
Next Ky
Application.ScreenUpdating = True
End Sub