kriter ekleme

Katılım
11 Ağustos 2005
Mesajlar
239
arkadaşlar yardımınıza ihtiyacım var
aşağıdaki süz işlemine bir kriter eklemek istiyorum
şuanda sayfa1 b sütünundaki isimleri tekrarsız şekilde listbox1 e yazıyor
isteğim yine aynı işlemi yapsın ama g sütünu dolu olanları yapsın

Private Sub TextBox1_Change()
Set S1 = Sheets("sayfa1")
With ListBox1
.ColumnCount = 1
.ColumnWidths = "65;"
End With
ListBox1.Clear
For suz = 2 To WorksheetFunction.CountA([sayfa1!b1:b65536])
alan = UCase(Replace(Replace(Sayfa1.Range("b" & suz), "j", "J"), "k", "K"))
veri = UCase(Replace(Replace(TextBox1, "j", "J"), "k", "K"))
If alan Like "*" & veri & "*" Then
If WorksheetFunction.CountIf(S1.Range("b2:b" & suz), S1.Cells(suz, "b")) > 1 Then GoTo 10
ListBox1.AddItem
ListBox1.list(s, 0) = Sayfa1.Range("B" & suz)
s = s + 1
End If
10 Next
If WorksheetFunction.CountIf([liste!b:b], TextBox1) > 0 Then
sat = [liste!b1:b65536].Find(TextBox1).Row
TextBox21 = Format(Sheets("liste").Cells(sat, "d"), "#,##0")
TextBox6 = Sheets("liste").Cells(sat, "e")
TextBox27 = Sheets("liste").Cells(sat, "c")
End If
 

Levent Menteşoğlu

Administrator
Yönetici
Admin
Katılım
13 Ekim 2004
Mesajlar
16,058
Excel Vers. ve Dili
Excel 2010-32 bit-Türkçe
Excel 365 -32 bit-Türkçe
Aşağıdaki gibi deneyin.

Kod:
Private Sub TextBox1_Change()
Set S1 = Sheets("sayfa1")
With ListBox1
.ColumnCount = 1
.ColumnWidths = "65;"
End With
ListBox1.Clear
For suz = 2 To WorksheetFunction.CountA([sayfa1!b1:b65536])
alan = UCase(Replace(Replace(Sayfa1.Range("b" & suz), "j", "J"), "k", "K"))
veri = UCase(Replace(Replace(TextBox1, "j", "J"), "k", "K"))
If alan Like "*" & veri & "*" [B][COLOR=red]and S1.cells(suz,"g")<>""[/COLOR][/B] Then
If WorksheetFunction.CountIf(S1.Range("b2:b" & suz), S1.Cells(suz, "b")) > 1 Then GoTo 10
ListBox1.AddItem
ListBox1.list(s, 0) = Sayfa1.Range("B" & suz)
s = s + 1
End If
10 Next
If WorksheetFunction.CountIf([liste!b:b], TextBox1) > 0 Then
sat =[liste!b1:b65536].Find(TextBox1).Row
TextBox21 = Format(Sheets("liste").Cells(sat, "d"), "#,##0")
TextBox6 = Sheets("liste").Cells(sat, "e")
TextBox27 = Sheets("liste").Cells(sat, "c")
End If
 
Katılım
11 Ağustos 2005
Mesajlar
239
hocam hata verdi ben size dosyayı yollasam daha iyi olmazmı vaktiniz varsa bir birde parite olayına göz atarsınız
 

Levent Menteşoğlu

Administrator
Yönetici
Admin
Katılım
13 Ekim 2004
Mesajlar
16,058
Excel Vers. ve Dili
Excel 2010-32 bit-Türkçe
Excel 365 -32 bit-Türkçe
Yukar&#305;daki kodu d&#252;zelttim tekrar deneyin.
 
Katılım
11 Ağustos 2005
Mesajlar
239
hocam şu firma risk yp deki pariteye bir göz atsan
 
Üst