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

بحث باي حرف


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

لدي هذا الكود ولكن عندما ابحث يبحث عن بداية الكلمة فقط هل ممكن ان يظهر النتائج باي حرف تسجلة ... وشكرا
 
Private Sub ButtonFind5_Click()
Dim Ary()
Dim r As Long, rr As Long, Lr As Long
Dim c As Integer
Dim txt As String
 
txt = Me.TextFind1
Me.ListBox1.Clear
 
With Sheets("ÍÇÆá5")
    Lr = .Cells(.Rows.Count, "E").End(xlUp).Row
    
    For r = 19 To Lr
        If InStr(CStr(.Cells(r, "E")), txt) Then
            rr = rr + 1
            ReDim Preserve Ary(1 To Cont, 1 To rr)
            For c = 1 To Cont
                Ary(c, rr) = .Cells(r, c).Value
            Next
        End If
    Next
    
End With
 
If rr Then Me.ListBox1.Column = Ary
 
Erase Ary
End Sub
رابط هذا التعليق
شارك

اخى عيسى

يفضل انت ترفق مرفق للعمل عليه

وذلك تسهيلا على الاخوه المشاركين فى الموضوع

.......................................................

على العموم

جرب تغير السطر التالى\

If InStr(CStr(.Cells(r, "E")), txt) Then

الى

If InStr(CStr(.Cells(r, "E")), txt)=1 Then

تقبل تحياتى

رابط هذا التعليق
شارك

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