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

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

قام بنشر

وعليكم السلام ورحمة الله تعالى وبركاته 

Sub Filtre()
Dim ws1 As Worksheet: Set ws1 = Sheets("Raw Data")
Dim ws2 As Worksheet: Set ws2 = Sheets("list filter")

  Application.ScreenUpdating = False
  On Error Resume Next
  ws1.ShowAllData
   '(B)'المعيار الاول عمود
   '--- Iso_Spool
   n = Application.CountA(ws2.Range("A2:A5"))
   If n > 0 Then
     Tbl = Application.Transpose(ws2.[A2].Resize(n))
     ws1.[A4].AutoFilter Field:=2, Criteria1:=Tbl, Operator:=xlFilterValues
   End If
    '(C)'المعيار الثاني عمود
   '--- Spool2
   n = Application.CountA(ws2.Range("B2:B5"))
   If n > 0 Then
     Tbl = Application.Transpose(ws2.[B2].Resize(n))
     ws1.[A4].AutoFilter Field:=3, Criteria1:=Tbl, Operator:=xlFilterValues
   End If
  '(E)'المعيار الثالث عمود
   '--- IdentCode
   n = Application.CountA(ws2.Range("C2:C5"))
   If n > 0 Then
     Tbl = Application.Transpose(ws2.[C2].Resize(n))
     ws1.[A4].AutoFilter Field:=5, Criteria1:=Tbl, Operator:=xlFilterValues
   End If
End Sub

 

TEST V3.xlsm

  • Like 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.

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

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

Important Information