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

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

قام بنشر

السلام عليكم 
في الملف المرفق أريد استخراج أساتذة كل قسم على حدى من الورقة الأم  EMPL PROF و وضعه في الورقة المسماة ISNAD حسب النموذج المرفق على أن تكون النتائج كما في الصورة 

natija.PNG

Classeur2.xlsx

  • تمت الإجابة
قام بنشر
Sub Test()
    Dim ws As Worksheet, sh As Worksheet, r As Range, d As Object, i As Long
    Application.ScreenUpdating = False
        Set ws = Sheets(1): Set sh = Sheets(2)
        Set d = CreateObject("Scripting.Dictionary")
        With ws
            Set r = .Range("B4:BF" & .Cells(Rows.Count, 3).End(xlUp).Row)
            For Each r In Intersect(r, r.Offset(1, 2))
                If r.Value <> "" Then
                    i = r.Row
                    d(.Cells(i, 2) & .Cells(i, 3) & r) = Array(.Cells(i, 2), .Cells(i, 3), r)
                End If
            Next r
        End With
        With sh
            .Range("C3:BE15").ClearContents
            .Range("BK1").Resize(d.Count, 3) = Application.Transpose(Application.Transpose(d.Items))
            .Range("BN1:BN" & d.Count).Formula = "=BL1&BM1"
            With .Range("C3:BE15")
                .Formula = "=IFERROR(INDEX($BK:$BK,MATCH($B3&C$2,$BN:$BN,0)),"""")"
                .Value = .Value
            End With
            .Columns("BK:BN").ClearContents
        End With
    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