Tu nivel de excel, está a ños luz del mio, mi código es el siguiente:
Private Sub CommandButton1_Click()
Dim contador As Integer
Dim x As Integer
Dim y As Integer
Dim centro As String
Dim centro2 As String
Dim book1 As Workbook
'Dim book2 As Workbook
'los asignas
Set book1 = Workbooks.Open("C:\Users\jordi\Desktop\Carpeta\base.xlsx")
For y = 2 To 30
centro = Sheet1.Cells(y, 5)
book1.Sheets("General").Cells(y, 1) = Sheet1.Cells(y, 1)
book1.Sheets("General").Cells(y, 2) = Sheet1.Cells(y, 2)
book1.Sheets("General").Cells(y, 3) = Sheet1.Cells(y, 3)
book1.Sheets("General").Cells(y, 4) = Sheet1.Cells(y, 4)
book1.Sheets("General").Cells(y, 5) = Sheet1.Cells(y, 5)
book1.Sheets("General").Cells(y, 6) = Sheet1.Cells(y, 6)
If centro <> Sheet1.Cells(y + 1, 5) Then
ActiveWorkbook.SaveAs Filename:= _
"C:\Users\jordi\Desktop\Carpeta\" & centro & " .xlsx", _
FileFormat:=xlOpenXMLWorkbook, CreateBackup:=False
book1.Close
Exit For
End If
Next y
End Sub
Codifo1 Número Personal Sociedad Porcentaje Centro
1 101 A 100 CENTRO1
2 102 A 100 CENTRO2
Con esta información crear dos ficheros de excel
Gracias y disculpa