Sub SplitSheets()
Application.ScreenUpdating = False
Dim i, j, l As Long
Sheet1.ShowAllData
i = Sheet1.Cells(Rows.Count, "S").End(xlUp).Row
For j = 2 To i
With Sheet1
.Range("A1:O1").AutoFilter field:=4, Criteria1:=.Range("S" & j)
Sheets.Add after:=Sheet1
ActiveSheet.Name = .Range("S" & j)
.Range("A1:O" & Sheet1.Cells(Rows.Count, "A").End(xlUp).Row).SpecialCells(xlCellTypeVisible).Copy Destination:=Sheets(.Range("S" & j).Text).Range("A1")
Application.CutCopyMode = False
l = Sheets(.Range("S" & j).Text).Cells(Rows.Count, "A").End(xlUp).Row
Sheets(.Range("S" & j).Text).Range("K" & l + 1) = Application.WorksheetFunction.Sum(Sheets(.Range("S" & j).Text).Range("K2:K" & l))
Sheets(.Range("S" & j).Text).Range("L" & l + 1) = Application.WorksheetFunction.Sum(Sheets(.Range("S" & j).Text).Range("L2:L" & l))
Sheets(.Range("S" & j).Text).Range("M" & l + 1) = Application.WorksheetFunction.Sum(Sheets(.Range("S" & j).Text).Range("M2:M" & l))
Sheets(.Range("S" & j).Text).Range("N" & l + 1) = Application.WorksheetFunction.Sum(Sheets(.Range("S" & j).Text).Range("N2:N" & l))
Sheets(.Range("S" & j).Text).Range("O" & l + 1) = Application.WorksheetFunction.Sum(Sheets(.Range("S" & j).Text).Range("O2:O" & l))
End With
Next
Application.ScreenUpdating = True
End Sub
Sub SplitSheets()
Application.ScreenUpdating = False
Dim i, j, l As Long
On Error Resume Next
Sheet1.ShowAllData
i = Sheet1.Cells(Rows.Count, "S").End(xlUp).Row
For j = 2 To i
With Sheet1
.Range("A1:O1").AutoFilter field:=4, Criteria1:=.Range("S" & j)
Sheets.Add after:=Sheet1
ActiveSheet.Name = .Range("S" & j)
.Range("A1:O" & Sheet1.Cells(Rows.Count, "A").End(xlUp).Row).SpecialCells(xlCellTypeVisible).Copy Destination:=Sheets(.Range("S" & j).Text).Range("A1")
Application.CutCopyMode = False
l = Sheets(.Range("S" & j).Text).Cells(Rows.Count, "A").End(xlUp).Row
Sheets(.Range("S" & j).Text).Range("K" & l + 1) = Application.WorksheetFunction.Sum(Sheets(.Range("S" & j).Text).Range("K2:K" & l))
Sheets(.Range("S" & j).Text).Range("L" & l + 1) = Application.WorksheetFunction.Sum(Sheets(.Range("S" & j).Text).Range("L2:L" & l))
Sheets(.Range("S" & j).Text).Range("M" & l + 1) = Application.WorksheetFunction.Sum(Sheets(.Range("S" & j).Text).Range("M2:M" & l))
Sheets(.Range("S" & j).Text).Range("N" & l + 1) = Application.WorksheetFunction.Sum(Sheets(.Range("S" & j).Text).Range("N2:N" & l))
Sheets(.Range("S" & j).Text).Range("O" & l + 1) = Application.WorksheetFunction.Sum(Sheets(.Range("S" & j).Text).Range("O2:O" & l))
End With
Next
Application.ScreenUpdating = True
End Sub