combobox veri aktarimi ?

Katılım
23 Şubat 2005
Mesajlar
9
merhaba arkadaslar
yine bu forumdan aldigim bir ornegi kendi calismamda kullanmak istiyorum fakat beceremedim kodlarida karistirdim amacim ilk sayfadaki kayitlarda cod bolumundeki numaralardan sectigim numarayi ikinci sayfaya komple satir olarak aktarmak
bana yardimci olurmusunuz . tesekkur ederim
 
Katılım
29 Eylül 2004
Mesajlar
1,810
Excel Vers. ve Dili
Excel 2002 TR
A değişkenini iki farklı değer için değişken olarak kullanmışsınız, bunun yerine combobox'ın değerini atadığınız değişkene combo dedim.
Umarım budur istediğiniz. Kolay gelsin.

[vb:1:b072006eb7]Private Sub ComboBox1_Click()
Range("A6:H65000").ClearContents

If ComboBox1.Value = "HEPSI" Then
c = 0
For A = 5 To 15000
If Sheets("EXPENS 05").Cells(A, 1) <> "" Then
c = c + 1
Sheets("RAPORLA").Cells(c + 5, 1) = Sheets("EXPENS 05").Cells(A, 1).Value
Sheets("RAPORLA").Cells(c + 5, 2) = Sheets("EXPENS 05").Cells(A, 2).Value
Sheets("RAPORLA").Cells(c + 5, 3) = Sheets("EXPENS 05").Cells(A, 3).Value
Sheets("RAPORLA").Cells(c + 5, 4) = Sheets("EXPENS 05").Cells(A, 4).Value
Sheets("RAPORLA").Cells(c + 5, 5) = Sheets("EXPENS 05").Cells(A, 5).Value
Sheets("RAPORLA").Cells(c + 5, 6) = Sheets("EXPENS 05").Cells(A, 6).Value
Sheets("RAPORLA").Cells(c + 5, 7) = Sheets("EXPENS 05").Cells(A, 7).Value
Sheets("RAPORLA").Cells(c + 5, 8) = Sheets("EXPENS 05").Cells(A, 8).Value
End If
Next A
Exit Sub
End If

combo = ComboBox1.Value * 1
c = 0
For A = 5 To 15000
If Sheets("EXPENS 05").Cells(A, 1).Value = combo And Sheets("EXPENS 05").Cells(A, 8) <> "" Then
c = c + 1
Sheets("RAPORLA").Cells(c + 5, 1) = Sheets("EXPENS 05").Cells(A, 1).Value
Sheets("RAPORLA").Cells(c + 5, 2) = Sheets("EXPENS 05").Cells(A, 2).Value
Sheets("RAPORLA").Cells(c + 5, 3) = Sheets("EXPENS 05").Cells(A, 3).Value
Sheets("RAPORLA").Cells(c + 5, 4) = Sheets("EXPENS 05").Cells(A, 4).Value
Sheets("RAPORLA").Cells(c + 5, 5) = Sheets("EXPENS 05").Cells(A, 5).Value
Sheets("RAPORLA").Cells(c + 5, 6) = Sheets("EXPENS 05").Cells(A, 6).Value
Sheets("RAPORLA").Cells(c + 5, 7) = Sheets("EXPENS 05").Cells(A, 7).Value
Sheets("RAPORLA").Cells(c + 5, 8) = Sheets("EXPENS 05").Cells(A, 8).Value
End If
Next A

End Sub[/vb:1:b072006eb7]
 
Katılım
23 Şubat 2005
Mesajlar
9
afedersiniz bir cevaba daha ihtiyacim olacak aslinda asil ogrenmek istedigim buydu.mesela ornekte a kolonunda arama yapiliyor satiri komple aktariyor ben ise H kolonunda arama yaptirip satiri komple aktarmak istiyorum,?
saygilarimla.
 

Levent Menteşoğlu

Administrator
Yönetici
Admin
Katılım
13 Ekim 2004
Mesajlar
16,057
Excel Vers. ve Dili
Excel 2010-32 bit-Türkçe
Excel 365 -32 bit-Türkçe
Bunun için aşağıdaki satırdaki cells(A,1) hücre referansını cells(A,8) olarak değiştirin. 8=H sütunu

[vb:1:80a087a164]If Sheets("EXPENS 05").Cells(A, 1) <> "" Then
[/vb:1:80a087a164]
 
Üst