• DİKKAT

    DOSYA İndirmek/Yüklemek için ÜCRETLİ ALTIN ÜYELİK Gereklidir!
    Altın Üyelik Hakkında Bilgi

Tablo da gün bazında sıralama

Katılım
28 Ocak 2012
Mesajlar
34
Excel Vers. ve Dili
2007
Private Sub CommandButton1_Click()
Unload Me
Sheets("Ana Ekran").Select
End Sub

Private Sub CommandButton2_Click()
Unload Me
Sheets("SORGULA").Select
End Sub

Private Sub CommandButton3_Click()
Unload Me
Sheets("Firma Bilgileri").Select
End Sub

Private Sub CommandButton4_Click()
Unload Me
Sheets("Sozbitim").Select
End Sub

Private Sub CommandButton5_Click()
Unload Me
Sheets("Fiyatlandırma").Select
UserForm2.Show
MsgBox "Sayfa kilitlidir. Lütfen yapmak istediğiniz işlemleri bu form üzerinden yapınız", vbCritical, UYARI
End Sub

Private Sub Label1_Click()

End Sub

Private Sub Label16_Click()

End Sub

Private Sub Label6_Click()

End Sub

Private Sub ListBox3_Click()

End Sub

Private Sub UserForm_Activate()
Application.ScreenUpdating = False
Call Eskİ
Call BuguN
Call BuaY
End Sub

Sub Eskİ()
Sheets("sozbitim").Activate
ListBox1.ColumnCount = 4
ListBox1.ColumnWidths = "80;80;80;80"
For i = 2 To Sheets("Sozbitim").Cells(101, "b").End(xlUp).Row
If CDate(Cells(i, "b").Value) < Date Then
ListBox1.AddItem
ListBox1.List(s, 0) = Format(Sheets("Sozbitim").Cells(i, "B"), "dd.mm.yyyy")
ListBox1.List(s, 1) = Format(Sheets("Sozbitim").Cells(i, "C"), "#,##0.00")
ListBox1.List(s, 2) = Format(Sheets("Sozbitim").Cells(i, "E"), "###########")
ListBox1.List(s, 3) = Format(Sheets("Sozbitim").Cells(i, "G"), "#######")
s = s + 1
End If
Next i
End Sub

Sub BuguN()
Sheets("sozbitim").Activate
ListBox2.ColumnCount = 4
ListBox2.ColumnWidths = "60;80;80;50"
For i = 2 To Sheets("Sozbitim").Cells(101, "b").End(xlUp).Row
If CDate(Cells(i, "b").Value) = Date Then
ListBox2.AddItem
ListBox2.List(s, 0) = Format(Sheets("Sozbitim").Cells(i, "B"), "dd.mm.yyyy")
ListBox2.List(s, 1) = Format(Sheets("Sozbitim").Cells(i, "C"), "#,##0.00")
ListBox2.List(s, 2) = Format(Sheets("Sozbitim").Cells(i, "E"), "###########")
ListBox2.List(s, 3) = Format(Sheets("Sozbitim").Cells(i, "G"), "### ## ### ###")
s = s + 1
End If
Next i
End Sub

Sub BuaY()
Sheets("sozbitim").Activate
ListBox3.ColumnCount = 5
ListBox3.ColumnWidths = "80;80;80;40;60"
For i = 2 To Sheets("Sozbitim").Cells(101, "b").End(xlUp).Row
If CDate(Cells(i, "b").Value) > Date And CDate(Cells(i, "B").Value) <= DateSerial(Year(Now), Month(Now) + 1, 0) Then
ListBox3.AddItem
ListBox3.List(s, 0) = Format(Sheets("Sozbitim").Cells(i, "B"), "dd.mm.yyyy")
ListBox3.List(s, 1) = Format(Sheets("Sozbitim").Cells(i, "C"), "#,##0.00")
ListBox3.List(s, 2) = Format(Sheets("Sozbitim").Cells(i, "E"), "###########")
ListBox3.List(s, 3) = Format(Sheets("Sozbitim").Cells(i, "G"), "#######")
ListBox3.List(s, 4) = Format(Sheets("Sozbitim").Cells(i, "H"), "#######")
s = s + 1
End If
Next i
Sheets("Ana ekran").Activate
Application.ScreenUpdating = True
End Sub


bo kod ile ay bazında sıralamayı alabiliyorum ancak 30 gün lük veri almak istiyorum. bu konuda bilgisi olanlardan yardımlarınızı bekliyorum.

şimdiden teşekkür ederim.
 
Private Sub CommandButton1_Click()
Unload Me
Sheets("Ana Ekran").Select
End Sub

Private Sub CommandButton2_Click()
Unload Me
Sheets("SORGULA").Select
End Sub

Private Sub CommandButton3_Click()
Unload Me
Sheets("Firma Bilgileri").Select
End Sub

Private Sub CommandButton4_Click()
Unload Me
Sheets("Sozbitim").Select
End Sub

Private Sub CommandButton5_Click()
Unload Me
Sheets("Fiyatlandırma").Select
UserForm2.Show
MsgBox "Sayfa kilitlidir. Lütfen yapmak istediğiniz işlemleri bu form üzerinden yapınız", vbCritical, UYARI
End Sub

Private Sub Label1_Click()

End Sub

Private Sub Label16_Click()

End Sub

Private Sub Label6_Click()

End Sub

Private Sub ListBox3_Click()

End Sub

Private Sub UserForm_Activate()
Application.ScreenUpdating = False
Call Eskİ
Call BuguN
Call BuaY
End Sub

Sub Eskİ()
Sheets("sozbitim").Activate
ListBox1.ColumnCount = 4
ListBox1.ColumnWidths = "80;80;80;80"
For i = 2 To Sheets("Sozbitim").Cells(101, "b").End(xlUp).Row
If CDate(Cells(i, "b").Value) < Date Then
ListBox1.AddItem
ListBox1.List(s, 0) = Format(Sheets("Sozbitim").Cells(i, "B"), "dd.mm.yyyy")
ListBox1.List(s, 1) = Format(Sheets("Sozbitim").Cells(i, "C"), "#,##0.00")
ListBox1.List(s, 2) = Format(Sheets("Sozbitim").Cells(i, "E"), "###########")
ListBox1.List(s, 3) = Format(Sheets("Sozbitim").Cells(i, "G"), "#######")
s = s + 1
End If
Next i
End Sub

Sub BuguN()
Sheets("sozbitim").Activate
ListBox2.ColumnCount = 4
ListBox2.ColumnWidths = "60;80;80;50"
For i = 2 To Sheets("Sozbitim").Cells(101, "b").End(xlUp).Row
If CDate(Cells(i, "b").Value) = Date Then
ListBox2.AddItem
ListBox2.List(s, 0) = Format(Sheets("Sozbitim").Cells(i, "B"), "dd.mm.yyyy")
ListBox2.List(s, 1) = Format(Sheets("Sozbitim").Cells(i, "C"), "#,##0.00")
ListBox2.List(s, 2) = Format(Sheets("Sozbitim").Cells(i, "E"), "###########")
ListBox2.List(s, 3) = Format(Sheets("Sozbitim").Cells(i, "G"), "### ## ### ###")
s = s + 1
End If
Next i
End Sub

Sub BuaY()
Sheets("sozbitim").Activate
ListBox3.ColumnCount = 5
ListBox3.ColumnWidths = "80;80;80;40;60"
For i = 2 To Sheets("Sozbitim").Cells(101, "b").End(xlUp).Row
If CDate(Cells(i, "b").Value) > Date And CDate(Cells(i, "B").Value) <= DateSerial(Year(Now), Month(Now) + 1, 0) Then
ListBox3.AddItem
ListBox3.List(s, 0) = Format(Sheets("Sozbitim").Cells(i, "B"), "dd.mm.yyyy")
ListBox3.List(s, 1) = Format(Sheets("Sozbitim").Cells(i, "C"), "#,##0.00")
ListBox3.List(s, 2) = Format(Sheets("Sozbitim").Cells(i, "E"), "###########")
ListBox3.List(s, 3) = Format(Sheets("Sozbitim").Cells(i, "G"), "#######")
ListBox3.List(s, 4) = Format(Sheets("Sozbitim").Cells(i, "H"), "#######")
s = s + 1
End If
Next i
Sheets("Ana ekran").Activate
Application.ScreenUpdating = True
End Sub


bo kod ile ay bazında sıralamayı alabiliyorum ancak 30 gün lük veri almak istiyorum. bu konuda bilgisi olanlardan yardımlarınızı bekliyorum.

şimdiden teşekkür ederim.

Problem halledildi.
 
Geri
Üst