- Katılım
- 8 Haziran 2007
- Mesajlar
- 761
- Excel Vers. ve Dili
- excel- 2003 Türkçe
DOSYA İndirmek/Yüklemek için ÜCRETLİ ALTIN ÜYELİK Gereklidir!
Altın Üyelik Hakkında Bilgi
Private Sub CommandButton1_Click()
Dim s1 As Worksheet, s2 As Worksheet, sat As Long, sat2 As Long
Dim hcr As Range
If ComboBox1.Value = "" Then Exit Sub
Set s1 = Sheets("DATA")
Set s2 = Sheets("RAPOR")
sat = s1.Cells(65536, "B").End(xlUp).Row
sat2 = s2.Cells(65536, "B").End(xlUp).Row + 1
For Each hcr In s1.Range("B2:E" & sat)
If hcr.Value = CDate(ComboBox1.Value) Then
s2.Range("A" & sat2) = sat2 - 1
s2.Range("B" & sat2 & ":E" & sat2).Value = s1.Range("B" & hcr.Row & ":E" & hcr.Row).Value
sat2 = sat2 + 1
End If
Next
End Sub
Private Sub CommandButton1_Click()
Sheets("RAPOR").Range("A2:E30").ClearContents
With Sayfa2
.[e1].AutoFilter
.[e1].AutoFilter field:=5, Criteria1:=CDate(ComboBox1.Value)
.[e1].CurrentRegion.Copy Sayfa3.[a1]
End With
End Sub
sh.Cells(sat, "B").Value = Range("E2").Value
sh.Cells(sat, "D").Value = Range("E5").Value
sh.Cells(sat, "C").Value = Range("E6").Value
sh.Cells(sat, "E").Value = Range("E27").Value
sh.Cells(sat, "F").Value = Range("E29").Value
[B][COLOR="Red"]range("E2:G6").clearcontents[/COLOR][/B]
1) if worksheetfunction.counta(range("E2:E6"))=0 thenaslında denemiştim ama hata vermişti. Demekki işi ehline bırakmak gerikiyormuşteşekkürler kolay gelsin.
Kusura bakmayın bende hayal gücü var ama icraat yok.
iki sorum daha olacak
1. If Range("E2").Value = "" Then bu kod ile sadece E2 hücreri boş iken değil de E2 ile E6 hücrelerinide kapsayacak şekilde olabilirmi.
2. Bir sutunda değişik tarihler var. Bu tarihlerden birini süzdükten sonra o tarihe ait bilgilerin hepsini nasıl silebilirim. Ekteki dosyada örnekte açıkladım.