اذهب الي المحتوي
أوفيسنا
بحث مخصص من جوجل فى أوفيسنا
Custom Search

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

قام بنشر

أخي الكريم مهند

جرب الكود بعد التعديل

Sub TarhilData2()
    Dim WS As Worksheet, SH As Worksheet
    Dim X As Long, Y As Long, Cell As Range
    Dim lRow As Long
    
    Set WS = Sheets("البيانات"): Set SH = Sheets("طبيب أطفال")
    
    Application.ScreenUpdating = False
        For Each Cell In WS.Range("X2:X11")
            If Not IsEmpty(Cell) Then
                X = Application.WorksheetFunction.Match(Cell.Value, SH.Rows(1), 0)
                lRow = SH.Cells(49, X).End(xlUp).Row + 1
                
                WS.Range(Cell.Offset(, -22), Cell.Offset(, -20)).Copy
                SH.Cells(lRow, X).PasteSpecial xlPasteValues
                Cell.Offset(, -1).Copy
                SH.Cells(lRow, X + 3).PasteSpecial xlPasteValues
               Cell.Offset(, 3).Copy
                SH.Cells(lRow, X + 4).PasteSpecial xlPasteValues
            End If
        Next Cell
        Application.CutCopyMode = False
    Application.ScreenUpdating = True
End Sub

 

 

  • Like 2

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