أخى الفاضل جرب هذا الكود
Sub ragab()
Dim cl As Range, sh As Worksheet
Application.ScreenUpdating = False
For Each sh In ThisWorkbook.Worksheets
If Not sh.Name = "Sheet1" Then
sh.Range("A1:G1000").ClearContents
End If
Next
LR = Cells(Rows.Count, 2).End(xlUp).Row
For Each cl In Range("B2:B" & LR)
x = Trim(cl.Value)
On Error Resume Next
If Worksheets(x) Is Nothing Then
Sheets.Add.Name = x
Sheets(x).Move After:=Sheets(Sheets.Count)
End If
Sheets("sheet1").Range("A1:G1").Copy
Sheets(x).Range("A1").PasteSpecial xlPasteValues
Sheets(x).Range("A1").PasteSpecial xlPasteFormats
cl.Offset(0, -1).Resize(1, 7).Copy
Sheets(x).Cells(Sheets(x).Cells(Rows.Count, 1).End(xlUp).Row + 1, 1).PasteSpecial xlPasteValues
Sheets(x).Cells(Sheets(x).Cells(Rows.Count, 1).End(xlUp).Row, 1).PasteSpecial xlPasteFormats
Sheets(x).Cells(Sheets(x).Cells(Rows.Count, 1).End(xlUp).Row, 1).PasteSpecial xlPasteColumnWidths
Application.CutCopyMode = False
Next
MsgBox "تم الترحيل بنجاح الى صفحات منفصلة"
Sheets("sheet1").Select
Application.ScreenUpdating = False
End Sub
كود ترحيل.rar