Sub Khboor_Tarheel()
'=============================================
' الية الكود بعد الترحيل يقوم بمسح البيانات التي تم ترحيلها
On Error Resume Next
Application.ScreenUpdating = False
For a = 11 To [a3000].End(xlUp).Row
If Cells(a, 1) <> "" Then
MySheets = Cells(a, 1)
With Sheets(MySheets).[a3000].End(xlUp)
.Offset(1, 0) = Cells(a, 1)
.Offset(1, 1) = Cells(a, 2)
.Offset(1, 2) = Cells(a, 3)
.Offset(1, 3) = Cells(a, 4)
.Offset(1, 4) = Cells(a, 5)
.Offset(1, 5) = Cells(a, 6)
.Offset(1, 6) = Cells(a, 7)
.Offset(1, 7) = Cells(a, 8)
.Offset(1, 8) = Cells(a, 9)
.Offset(1, 9) = Cells(a, 10)
.Offset(1, 10) = Cells(a, 11)
.Offset(1, 11) = Cells(a, 12)
.Offset(1, 12) = Cells(a, 13)
.Offset(1, 13) = Cells(a, 14)
.Offset(1, 14) = Cells(a, 15)
.Offset(1, 15) = Cells(a, 16)
.Offset(1, 16) = Cells(a, 17)
.Offset(1, 17) = Cells(a, 18)
.Offset(1, 18) = Cells(a, 19)
.Offset(1, 19) = Cells(a, 20)
.Offset(1, 20) = Cells(a, 21)
.Offset(1, 21) = Cells(a, 22)
.Offset(1, 22) = Cells(a, 23)
.Offset(1, 23) = Cells(a, 24)
.Offset(1, 24) = Cells(a, 25)
.Offset(1, 25) = Cells(a, 26)
.Offset(1, 26) = Cells(a, 27)
.Offset(1, 27) = Cells(a, 28)
.Offset(1, 28) = Cells(a, 29)
.Offset(1, 29) = Cells(a, 30)
.Offset(1, 30) = Cells(a, 31)
.Offset(1, 31) = Cells(a, 32)
.Offset(1, 32) = Cells(a, 33)
.Offset(1, 33) = Cells(a, 34)
.Offset(1, 34) = Cells(a, 35)
.Offset(1, 35) = Cells(a, 36)
.Offset(1, 36) = Cells(a, 37)
.Offset(1, 37) = Cells(a, 38)
.Offset(1, 38) = Cells(a, 39)
.Offset(1, 39) = Cells(a, 40)
End With
End If
' If Sheets("ورقة1").Cells(a, "a") > "" Then Cells(a, 3).Resize(1, 4).Value = "" ' اذا اردت مسح البيانات بعد الترحيل حفز هذا السطر
Next a
Application.ScreenUpdating = True
MsgBox "!تم الترحيل بنجاح", vbInformation + vbMsgBoxRight, "تم الترحيل"
Range("a1").Select
On Error Resume Next
On Error GoTo 0
End Sub
السلام عليكم
لم أفهم ، ماذا تعني؟
الكود الأصلي لاستاذنا الكبير خبور، تغير كثيرا الآن
أرجو التوضيح اقتباس
جزاك الله كل خير وبارك لك
هذا هو الكود والملف موجود بالمشاركه رقم15 لو نظرت في الملف تجد ان العمود A به المعيار مثل ناجح ودور تان وغير ذلك اريد ان اضع هذه المعايير في عمود آخر فأين الجزئيه التي اغير منها
مع رجاء اضافه ميزة المسح