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

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

قام بنشر

مجرد تخمين 

Sub Button1_Click()
 Dim i As Long
 For i = Sheet1.Cells(Rows.Count, 3).End(xlUp).Row To 1 Step -1
 If Sheet1.Cells(i, 3) = "ناجح" Or Sheet1.Cells(i, 3) = "راسب" Then
 Sheet1.Range("a" & i & ":c" & i).Copy Sheet3.Cells(Rows.Count, 1).End(xlUp).Offset(1)
 End If
 Next
End Sub

 

  • Like 2
قام بنشر (معدل)

حل آخر

Sub test()
    Dim a
    Dim i&
    a = Sheets("DATA").Cells(1).CurrentRegion
    With CreateObject("scripting.dictionary")
    For i = 2 To UBound(a)
    If a(i, 3) = Sheets("RESULT").Cells(1, 5) Then
   If Not .exists(a(i, 1)) Then .Add a(i, 1), Array(a(i, 1), a(i, 2), a(i, 3))
   End If
    Next
    a = Application.Index(.items, 0, 0)
    End With
    With Sheets("RESULT").Cells(1).CurrentRegion.Offset(1)
.ClearContents
  .Resize(UBound(a), 3) = a
    End With
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