ahmed_ummu
Altın Üye
- Katılım
- 28 Mart 2011
- Mesajlar
- 777
- Excel Vers. ve Dili
- Excel 2010 Professional Plus 64 Bit
DOSYA İndirmek/Yüklemek için ÜCRETLİ ALTIN ÜYELİK Gereklidir!
Altın Üyelik Hakkında Bilgi
Private Sub CommandButton1_Click()
Dim veri
Dim sonA, sonB, sn
sonA = Cells(Rows.Count, "A").End(3).Row
sonB = Cells(Rows.Count, "B").End(3).Row
sn = Evaluate("=IFERROR(MATCH(B1:B" & sonB & ",$A$1:$A$" & sonA & ",0)-1,-1)")
If IsArray(sn) Then
For Each s In sn
If s <> -1 Then ListBox1.Selected(s) = True
Next s
End If
End Sub
Dosyanız ekte
Kod:Private Sub CommandButton1_Click() Dim veri Dim sonA, sonB, sn sonA = Cells(Rows.Count, "A").End(3).Row sonB = Cells(Rows.Count, "B").End(3).Row sn = Evaluate("=IFERROR(MATCH(B1:B" & sonB & ",$A$1:$A$" & sonA & ",0)-1,-1)") If IsArray(sn) Then For Each s In sn If s <> -1 Then ListBox1.Selected(s) = True Next s End If End Sub
Dosyanız ekte
Private Sub CommandButton1_Click()
Dim sonA, sonB, sn, s
sonA = Cells(Rows.Count, "A").End(3).Row
With ListBox1
If .Tag = "" Then .Tag = False
If CBool(.Tag) Then
.RowSource = "Sayfa1!A1:A" & sonA
CommandButton1.Caption = "Tanımlı Branşları Seç"
Else
sonB = Cells(Rows.Count, "B").End(3).Row
sn = Evaluate("TRANSPOSE(IFERROR(MATCH(B1:B" & sonB & ",$A$1:$A$" & sonA & ",0)-1,""-""))")
If Not IsArray(sn) Then sn = Array(sn)
For Each s In Filter(sn, "-", False)
.Selected(s) = True
Next s
CommandButton1.Caption = "Seçimi Temizle"
End If
.Tag = Not CBool(.Tag)
End With
End Sub
Kod:Private Sub CommandButton1_Click() Dim sonA, sonB, sn, s sonA = Cells(Rows.Count, "A").End(3).Row With ListBox1 If .Tag = "" Then .Tag = False If CBool(.Tag) Then .RowSource = "Sayfa1!A1:A" & sonA CommandButton1.Caption = "Tanımlı Branşları Seç" Else sonB = Cells(Rows.Count, "B").End(3).Row sn = Evaluate("TRANSPOSE(IFERROR(MATCH(B1:B" & sonB & ",$A$1:$A$" & sonA & ",0)-1,""-""))") If Not IsArray(sn) Then sn = Array(sn) For Each s In Filter(sn, "-", False) .Selected(s) = True Next s CommandButton1.Caption = "Seçimi Temizle" End If .Tag = Not CBool(.Tag) End With End Sub
Kod:Private Sub CommandButton1_Click() Dim sonA, sonB, sn, s sonA = Cells(Rows.Count, "A").End(3).Row With ListBox1 If .Tag = "" Then .Tag = False If CBool(.Tag) Then .RowSource = "Sayfa1!A1:A" & sonA CommandButton1.Caption = "Tanımlı Branşları Seç" Else sonB = Cells(Rows.Count, "B").End(3).Row sn = Evaluate("TRANSPOSE(IFERROR(MATCH(B1:B" & sonB & ",$A$1:$A$" & sonA & ",0)-1,""-""))") If Not IsArray(sn) Then sn = Array(sn) For Each s In Filter(sn, "-", False) .Selected(s) = True Next s CommandButton1.Caption = "Seçimi Temizle" End If .Tag = Not CBool(.Tag) End With End Sub
örnek dosya eklemeniz gerekir