udentr2002
Altın Üye
- Katılım
- 5 Kasım 2006
- Mesajlar
- 1,503
- Excel Vers. ve Dili
- iş yerinde Office 365
evde Office 365
Merhaba arkadaşlar listboxda 11. kolondaki değerleri toplatıp textboxa yazırabilmem için nasıl bir kod yazabilirim?
DOSYA İndirmek/Yüklemek için ÜCRETLİ ALTIN ÜYELİK Gereklidir!
Altın Üyelik Hakkında Bilgi
Sizin önceki dosyanız dan bahsediyorsanız.Süzme yapılacağı anda 11nci kolunun tolamını almak dağa hızlı olacaktır.Merhaba arkadaşlar listboxda 11. kolondaki değerleri toplatıp textboxa yazırabilmem için nasıl bir kod yazabilirim?
Dim toplam As Double
For i = 0 To ListBox1.ListCount - 1
toplam = ListBox1.Column(10, i) + toplam
Next
TextBox1.Value = Format(toplam, "#,##0.00")
Sub listele()
Dim i As Long, a As Long, k As Byte, deg As Double
ListBox1.RowSource = ""
ReDim myarr(1 To 12, 1 To 1)
For i = 3 To Cells(65536, "B").End(xlUp).Row
If LCase(Replace(Replace(Cells(i, "C").Value, "I", "ı"), "İ", "i")) Like ComboBox1.Value & "*" _
And LCase(Replace(Replace(Cells(i, "E").Value, "I", "ı"), "İ", "i")) Like ComboBox2.Value & "*" _
And LCase(Replace(Replace(Cells(i, "F").Value, "I", "ı"), "İ", "i")) Like ComboBox3.Value & "*" Then
a = a + 1
ReDim Preserve myarr(1 To 12, 1 To a)
For k = 1 To 12
myarr(k, a) = Cells(i, k).Value
Next k
If a = 1 Then
deg = Cells(i, 10).Value
ElseIf Cells(i, 10).Value < deg Then
deg = Cells(i, 10).Value
End If
End If
Next i
If a > 0 Then ListBox1.Column = myarr
Erase myarr
Label17.Caption = Format(deg, "#,##0.00") & " " & "YTL'dir"
End Sub
Sub listele()
Dim i As Long, a As Long, k As Byte, deg As Double,toplam as double
ListBox1.RowSource = ""
ReDim myarr(1 To 12, 1 To 1)
For i = 3 To Cells(65536, "B").End(xlUp).Row
If LCase(Replace(Replace(Cells(i, "C").Value, "I", "ı"), "İ", "i")) Like ComboBox1.Value & "*" _
And LCase(Replace(Replace(Cells(i, "E").Value, "I", "ı"), "İ", "i")) Like ComboBox2.Value & "*" _
And LCase(Replace(Replace(Cells(i, "F").Value, "I", "ı"), "İ", "i")) Like ComboBox3.Value & "*" Then
a = a + 1
ReDim Preserve myarr(1 To 12, 1 To a)
For k = 1 To 12
myarr(k, a) = Cells(i, k).Value
Next k
[COLOR="red"][B]toplam=cells(i,11).value+toplam[/B][/COLOR]
If a = 1 Then
deg = Cells(i, 10).Value
ElseIf Cells(i, 10).Value < deg Then
deg = Cells(i, 10).Value
End If
End If
Next i
If a > 0 Then ListBox1.Column = myarr
Erase myarr
Label17.Caption = Format(deg, "#,##0.00") & " " & "YTL'dir"
[COLOR="Red"][B]textbox1.value=format(toplam,"#,##0.00")[/B][/COLOR]
End Sub
Rica ederim.tekrardan çok teşekkür ederim hocam dediğiniz kodları değiştireceğim