اذهب الي المحتوي
أوفيسنا

كود ترحيل البيانات من صفحة الى أخرى


إذهب إلى أفضل إجابة Solved by حسين مامون,

الردود الموصى بها

  • أفضل إجابة

يمكنك استعمال هذا الماكرو البسيط 

انسخه الى مديول واربططه بزر في شيت sadol1

 

Option Explicit

Sub test()
Dim SD1 As Worksheet
Dim SD2 As Worksheet
Dim lr1, lr2, lr3, lr4
Application.ScreenUpdating = False
Set SD1 = Sheets("sadok1")
Set SD2 = Sheets("sadok2")
lr1 = SD1.Cells(Rows.Count, "b").End(3).Row
lr2 = SD1.Cells(Rows.Count, "s").End(3).Row
        SD1.Range("b8:o" & lr1).Copy
            lr3 = SD2.Cells(Rows.Count, "b").End(3).Row + 1
                SD2.Range("b" & lr3).PasteSpecial
                    SD1.Range("s8:af" & lr2).Copy
                       lr4 = SD2.Cells(Rows.Count, "s").End(3).Row + 1
                    SD2.Range("s" & lr4).PasteSpecial
               Application.CutCopyMode = False
         SD1.Range("b8:o10000").ClearContents
     SD1.Range("s8:af10000").ClearContents
Application.ScreenUpdating = True
End Sub

 

  • Like 1
  • Thanks 1
رابط هذا التعليق
شارك

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

زائر
اضف رد علي هذا الموضوع....

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • اضف...

Important Information