DOSYA İndirmek/Yüklemek için ÜCRETLİ ALTIN ÜYELİK Gereklidir!
Altın Üyelik Hakkında Bilgi
Private Sub TextBox1_Change()
Range("A5:H100").ClearContents
If TextBox1 = "" Then Exit Sub
Dim v As Worksheet
Dim a As Integer, b As Integer, s As Integer, x As Integer
Set v = Sheets("VERİ")
s = WorksheetFunction.CountIf(v.Range("A:A"), TextBox1.Value)
If s > 0 Then
ReDim dz(1 To s, 1 To 8)
For a = 3 To v.Cells(Rows.Count, 1).End(3).Row
If v.Cells(a, "A") Like TextBox1.Value Then
x = x + 1
For b = 1 To 8
dz(x, b) = v.Cells(a, b)
Next
End If
Next
Range("A5").Resize(UBound(dz), UBound(dz, 2)).Value = dz
End If
End Sub
Private Sub TextBox1_Change()
Veri_Al
End Sub
Private Sub TextBox2_Change()
Veri_Al
End Sub
Private Sub TextBox3_Change()
Veri_Al
End Sub
Private Sub TextBox4_Change()
Veri_Al
End Sub
Private Sub Veri_Al()
Dim v As Worksheet
Dim a As Integer, b As Integer, x As Integer
Dim t1 As Date, t2 As Date
Dim d1 As String, d2 As String
Range("A5:H100000").ClearContents
If TextBox1 & TextBox2 & TextBox3 & TextBox4 = "" Then Exit Sub
If TextBox1 = "" Then d1 = "*" Else d1 = TextBox1 '1
If IsDate(TextBox2) Then t1 = TextBox2 Else t1 = DateValue("01.01.1900") 'büyüktür
If TextBox3 = "" Then d2 = "*" Else d2 = TextBox3 '2
If IsDate(TextBox4) Then t2 = TextBox4 Else t2 = DateValue("31.12.2050") 'Küçüktür
Set v = Sheets("VERİ")
ReDim dz(1 To 8, 1 To 1)
For a = 3 To v.Cells(Rows.Count, 1).End(3).Row
If v.Cells(a, "A") Like d1 And v.Cells(a, "B") Like d2 And DateValue(v.Cells(a, "E")) > t1 And DateValue(v.Cells(a, "E")) < t2 Then
x = x + 1
ReDim Preserve dz(1 To 8, 1 To x)
For b = 1 To 8
dz(b, x) = v.Cells(a, b)
Next
End If
Next
Range("A5").Resize(UBound(dz, 2), UBound(dz)).Value = Application.Transpose(dz)
End Sub