arkadaşlar formda combobox ta arama yaparken diyelimki tek haneli yani 1 i arıyorum ama 11, 12, 112 gibi 1 le başlayanların tamamı geliyor bunu nasıl düzeltirim acaba teşekürler
Kod:
Private Sub ComboBox5_Change()
Dim sat, s As Integer
Dim deg1, deg2 As String
With ListBox1
.Clear
.ColumnCount = 7
.ColumnWidths = "0;45;55;135;65;180;70"
End With
For sat = 3 To Cells(65536, "B").End(xlUp).Row
deg1 = UCase(Replace(Replace(Cells(sat, "B"), "ı", "I"), "i", "İ"))
deg2 = UCase(Replace(Replace(ComboBox5, "ı", "I"), "i", "İ"))
If deg1 Like "*" & deg2 & "*" Then
ListBox1.ListIndex = ListBox1.ListCount - 1
ListBox1.AddItem
ListBox1.List(s, 0) = sat
ListBox1.List(s, 1) = Cells(sat, "B")
ListBox1.List(s, 2) = Cells(sat, "C")
ListBox1.List(s, 3) = Cells(sat, "D")
ListBox1.List(s, 4) = Cells(sat, "E")
ListBox1.List(s, 5) = Cells(sat, "F")
ListBox1.List(s, 6) = Format(Cells(sat, "G"), "##,#0.00 TL")
ListBox1.List(s, 7) = Cells(sat, "A")
Toplam
s = s + 1
End If: Next
End Sub
