aşağıdaki makroda b sütunu yerine l sütununu seçmek için ne yapmalıyım?tşk ediyorum.iyi çalışmalar.b leri l yaptım ama olmadı.
Private Sub ComboBox1_Change()
'On Error Resume Next
Dim s1 As Worksheet
Dim a, i, n, b()
Set s1 = Sheets("Sayfa1")
'*******************************************
a = s1.Range("a2:b" & s1.[a65536].End(3).Row).Value
ReDim b(1 To UBound(a, 1), 1 To 3)
With CreateObject("Scripting.Dictionary")
.CompareMode = vbTextCompare
For i = 1 To UBound(a, 1)
If Not IsEmpty(a(i, 1)) And Month(CDate(a(i, 1))) = Me.ComboBox1.Value * 1 Then
If Not .exists(a(i, 1)) Then
n = n + 1
b(n, 1) = n
b(n, 2) = a(i, 1)
.Add a(i, 1), n
End If
b(.Item(a(i, 1)), 3) = b(.Item(a(i, 1)), 3) + a(i, 2)
End If
Next
End With
Private Sub ComboBox1_Change()
'On Error Resume Next
Dim s1 As Worksheet
Dim a, i, n, b()
Set s1 = Sheets("Sayfa1")
'*******************************************
a = s1.Range("a2:b" & s1.[a65536].End(3).Row).Value
ReDim b(1 To UBound(a, 1), 1 To 3)
With CreateObject("Scripting.Dictionary")
.CompareMode = vbTextCompare
For i = 1 To UBound(a, 1)
If Not IsEmpty(a(i, 1)) And Month(CDate(a(i, 1))) = Me.ComboBox1.Value * 1 Then
If Not .exists(a(i, 1)) Then
n = n + 1
b(n, 1) = n
b(n, 2) = a(i, 1)
.Add a(i, 1), n
End If
b(.Item(a(i, 1)), 3) = b(.Item(a(i, 1)), 3) + a(i, 2)
End If
Next
End With
