Alt + F11 复制代码进去,F5运行
Option Explicit
Sub 拆分()
Dim dic As Object, ws As Worksheet, wb As Workbook, arr, k, i%
Set dic = CreateObject("scripting.dictionary")
Application.ScreenUpdating = False
For Each ws In Sheets
arr = ws.Range("a1").CurrentRegion
For i = 2 To UBound(arr)
'机构在第几列就修改里面的数值2为第几列
dic(arr(i, 2)) = ""
Next i
For Each k In dic.keys()
ws.Range("a1").AutoFilter 2, k
Set wb = Workbooks.Add
ws.Range("a1").CurrentRegion.Copy wb.ActiveSheet.Cells(1, 1)
wb.SaveAs ThisWorkbook.Path & "\" & ws.Name & "-" & k & ".xlsx"
wb.Close
Next k
ws.AutoFilterMode = False
Next ws
Application.ScreenUpdating = True
MsgBox "拆分完成!"
End Sub
【结果】