• DİKKAT

    DOSYA İndirmek/Yüklemek için ÜCRETLİ ALTIN ÜYELİK Gereklidir!
    Altın Üyelik Hakkında Bilgi

Değer Arama

sahika51

Altın Üye
Katılım
28 Ekim 2006
Mesajlar
187
Excel Vers. ve Dili
2010-2019
İyi Akşamlar;
Küçük bir çalışma yapıyorum. Yardım ederseniz sevinirim.
1-Kayıt Görüntüledeki TextBox1 e ad soyad yazdığımda farklı şeyler çıkıyor orayı düzeltemedim. Aramayı okul no değerlerine göre yapıyor. Ad Soyad değerlerine göre yapmalı.
2-Listboxa gelen değer seçilip rapor a bastığızda değerler rapor sayfasında ilgili hücrelere gelmesi gerekiyor. Şimdiden yardımlarınız için teşekkür ederim.
 

Ekli dosyalar

Userform 2 seçerek kopyalayınız.
Kod:
Private Sub UserForm_Initialize()
ListBox1.ColumnCount = 10
ListBox1.ColumnWidths = "60,40,30,30,30,30,30,30,30,30"
Sons = Sheets(1).Range("A65536").End(xlUp).Row
For Satir = 2 To Sons
    ListBox1.AddItem
    ListBox1.List(ListBox1.ListCount - 1, 0) = Sheets(1).Cells(Satir, 1)
    ListBox1.List(ListBox1.ListCount - 1, 1) = Sheets(1).Cells(Satir, 2)
    ListBox1.List(ListBox1.ListCount - 1, 2) = Sheets(1).Cells(Satir, 3)
      ListBox1.List(ListBox1.ListCount - 1, 3) = Sheets(1).Cells(Satir, 4)
      ListBox1.List(ListBox1.ListCount - 1, 4) = Sheets(1).Cells(Satir, 5)
        ListBox1.List(ListBox1.ListCount - 1, 5) = Sheets(1).Cells(Satir, 6)
         ListBox1.List(ListBox1.ListCount - 1, 6) = Sheets(1).Cells(Satir, 7)
          ListBox1.List(ListBox1.ListCount - 1, 7) = Sheets(1).Cells(Satir, 8)
           ListBox1.List(ListBox1.ListCount - 1, 8) = Sheets(1).Cells(Satir, 9)
            ListBox1.List(ListBox1.ListCount - 1, 9) = Sheets(1).Cells(Satir, 10)
Next Satir
End Sub
Userform2 texbox1 de yazdıklarınızı siliniz ve aşağıdaki kodu kopyalayınız.İsme göre bulur.
Kod:
Private Sub TextBox1_Change()
On Error Resume Next
ListBox1.Clear
b = UCase(Replace(Replace(TextBox1, "ı", "I"), "i", "İ"))
For Satir = 2 To [A65536].End(xlUp).Row
    If UCase(Replace(Replace(Sheets("veri").Cells(Satir, 1).Value, "ı", "I"), "i", "İ")) _
    Like "" & b & "*" Then
ListBox1.AddItem
    ListBox1.List(ListBox1.ListCount - 1, 0) = Sheets(1).Cells(Satir, 1)
    ListBox1.List(ListBox1.ListCount - 1, 1) = Sheets(1).Cells(Satir, 2)
    ListBox1.List(ListBox1.ListCount - 1, 2) = Sheets(1).Cells(Satir, 3)
      ListBox1.List(ListBox1.ListCount - 1, 3) = Sheets(1).Cells(Satir, 4)
      ListBox1.List(ListBox1.ListCount - 1, 4) = Sheets(1).Cells(Satir, 5)
        ListBox1.List(ListBox1.ListCount - 1, 5) = Sheets(1).Cells(Satir, 6)
         ListBox1.List(ListBox1.ListCount - 1, 6) = Sheets(1).Cells(Satir, 7)
          ListBox1.List(ListBox1.ListCount - 1, 7) = Sheets(1).Cells(Satir, 8)
           ListBox1.List(ListBox1.ListCount - 1, 8) = Sheets(1).Cells(Satir, 9)
            ListBox1.List(ListBox1.ListCount - 1, 9) = Sheets(1).Cells(Satir, 10)
End If
Next satir
End Sub
 
Son düzenleme:
Çıtır çok teşekkür ederim. Tam istediğim gibi olmuş. Ancak Rapor butonuna bastığımızda listboxta seçili değer Rapor sayfasına b1 b2 b3.....b10 hücrelerine aktarması gerekiyor.
 
Userform 2 seçerek kopyalayınız. Listboxt seçtiğiniz satırdaki değerler aktarılır.
Kod:
Private Sub ListBox1_Click()
Satir = ListBox1.ListIndex
Sheets(2).Range("B1").Value = ListBox1.List(Satir, 0)
Sheets(2).Range("B2").Value = ListBox1.List(Satir, 1)
Sheets(2).Range("B3").Value = ListBox1.List(Satir, 2)
Sheets(2).Range("B4").Value = ListBox1.List(Satir, 3)
Sheets(2).Range("B5").Value = ListBox1.List(Satir, 4)
Sheets(2).Range("B6").Value = ListBox1.List(Satir, 5)
Sheets(2).Range("B7").Value = ListBox1.List(Satir, 6)
Sheets(2).Range("B8").Value = ListBox1.List(Satir, 7)
Sheets(2).Range("B9").Value = ListBox1.List(Satir, 8)
Sheets(2).Range("B10").Value = ListBox1.List(Satir, 9)
End Sub
 
Geri
Üst