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

كود ترحيل


2saad
إذهب إلى أفضل إجابة Solved by lionheart,

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

  • أفضل إجابة

Here's the code and please try to learn from the solutions as it is a bad attitude to wait the help all the time from other people

Sub Test()
    Dim a, e, sh As Worksheet, f As Boolean, lr As Long, r As Long
    Application.ScreenUpdating = False
        Set sh = ThisWorkbook.Worksheets("Saad")
        f = True: sh.Cells.ClearContents
        For Each e In Array("Sheet1", "Sheet2", "Sheet3")
            With ThisWorkbook.Worksheets(e)
                lr = .Cells(Rows.Count, "M").End(xlUp).Row
                a = .Range("K5:X" & lr).Value
                If f Then r = 5: f = False Else r = sh.Cells(Rows.Count, "C").End(xlUp).Row + 1
                sh.Cells(r, "C").Resize(UBound(a, 1), UBound(a, 2)).Value = a
            End With
        Next e
    Application.ScreenUpdating = True
End Sub

 

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

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.

  • تصفح هذا الموضوع مؤخراً   0 اعضاء متواجدين الان

    • لايوجد اعضاء مسجلون يتصفحون هذه الصفحه
×
×
  • اضف...

Important Information