Userform üzerindeki butona aşağıdaki kod yazılmıştır.
[vb:1:c35fd617ac]Private Sub CommandButton7_Click()
Set s1 = Sheets("müşteri_extresi")
s1.[a2:e65536].ClearContents
For a = 2 To [b65536].End(xlUp).Row
If Cells(a, 2) = ComboBox1.Value Then
If Month(Cells(a, 1).Value) < Month(1 & "." & ComboBox2.Value & ".2005") * 1 Then
ver = ver + Cells(a, 4)
al = al + Cells(a, 5)
s1.[c2] = "DEVİR"
s1.[d2] = ver - al
GoTo 10
End If
say = WorksheetFunction.CountA(s1.[c2:c65536])
For b = 1 To 5
s1.Cells(say + 2, b) = Cells(a, b).Value
Next
End If
10 Next
Unload Me
s1.Select
End Sub
[/vb:1:c35fd617ac]