• DİKKAT

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

ComboBox tekrarlanan Veriler

Katılım
6 Eylül 2004
Mesajlar
239
Excel Vers. ve Dili
Excel 2013 Türkçe
selam arkadaşlar

benim sorunun UserForm ComboBox kulanıyorum sayfadan veri almak için benim istediğim tekrarlanan hücrelerden birini gösdersin örnek 20 adet ahmet yazıyorsa CombBox'da bir adet ahmet yazsın

imdat saral
izmir
 
Bütün comboboxlara properties penceresinde rowsource özelliğine tanımladığınız alanları silin. Sonrada aşağıdaki kodu userforma yazın.

[vb:1:e3f1a775ad]Private Sub UserForm_Initialize()
For x = 3 To Cells(65536, 1).End(xlUp).Row
If WorksheetFunction.CountIf(Range("A3:A" & x), Cells(x, 1)) = 1 Then
ComboBox6.AddItem Cells(x, 1).Value
ComboBox1.AddItem Cells(x, 1).Value
End If
If WorksheetFunction.CountIf(Range("C3:C" & x), Cells(x, 3)) = 1 Then
ComboBox2.AddItem Cells(x, 3).Value
ComboBox7.AddItem Cells(x, 3).Value
End If
If WorksheetFunction.CountIf(Range("D3:D" & x), Cells(x, 4)) = 1 Then
ComboBox3.AddItem Cells(x, 4).Value
End If
If WorksheetFunction.CountIf(Range("E3:E" & x), Cells(x, 5)) = 1 Then
ComboBox4.AddItem Cells(x, 5).Value
End If
If WorksheetFunction.CountIf(Range("F3:F" & x), Cells(x, 6)) = 1 Then
ComboBox5.AddItem Cells(x, 6).Value
End If
Next
End Sub[/vb:1:e3f1a775ad]
 
leventm,

Çok teşekür ederim. Eline sağlık

imdat saral
izmir
 
Geri
Üst