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

فلتر متقدم


إذهب إلى أفضل إجابة Solved by احمد عبدالحليم,

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

  • أفضل إجابة

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

تفضل اخى جرب الملف

الكود فى حدث الشيت Change

Private Sub Worksheet_Change(ByVal Target As Range)
    Dim filterRange As Range
    Dim dataRange As Range
    Dim lastRow As Long
    Dim lastRow2 As Long
Application.ScreenUpdating = False
   If Target.Address = "$P$4" Then
 
         lastRow2 = Cells(Rows.Count, "P").End(xlUp).Row

        Range("P6:V" & lastRow2 + 1).ClearContents
        If Not IsEmpty(Target.Value) Then
        lastRow = Cells(Rows.Count, "E").End(xlUp).Row
        Set dataRange = Range("A6:G" & lastRow)

        dataRange.AutoFilter Field:=5, Criteria1:="*" & Target.Value & "*"



        dataRange.Copy Range("P6")

        dataRange.AutoFilter

     End If
    End If
Application.ScreenUpdating = True
End Sub

 

Data.xlsm

  • Like 3
  • Thanks 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