gurbuzs
Altın Üye
- Katılım
- 10 Kasım 2004
- Mesajlar
- 201
- Excel Vers. ve Dili
- Office 360 Tr
- Altın Üyelik Bitiş Tarihi
- 12-11-2026
DOSYA İndirmek/Yüklemek için ÜCRETLİ ALTIN ÜYELİK Gereklidir!
Altın Üyelik Hakkında Bilgi
Ekli dosyayı görüntüle 251838
Tescil tarihine göre önümüzdeki günlerde ne zaman muayeneye gireceğini bulmak için formule ihtiyacım var.
Sarı alanı otomatize etmem gerekiyor.
Muzaffer Ali bey heryerde varsınız maşallah.Merhaba.
Dosyanız ekte.
Muzaffer Ali bey dosyanıza ekleme yaptım ekte görebilirsiniz.Merhaba.
Dosyanız ekte.
tabi olabilir ama yanlış olur o zaman. biliyosunuz ülkemizde günü gününe kimse muayeneye gitmiyor ceza da yese geç gidiyor veya 1 ay önce gidiyor. o zaman tarihler hep muayeneye gittiği tarihten sayıyor.Tarih olarak muayene tarihi varsa tescil tarihi kısmına bir yıl öncesini yazabilirsiniz.
Private Sub btnMuayene_Click()
Dim Bak As Long
Dim Yil As Long
Dim Tarih As Date
Dim stp As Byte
Dim Yill As Integer
For Bak = 3 To Cells(Rows.Count, "B").End(xlUp).Row
If Cells(Bak, "D").Value = "Ticari" Then
If IsDate(Cells(Bak, "E").Value) Then
Cells(Bak, "F").Value = DateAdd("YYYY", 1, Cells(Bak, "E").Value)
GoTo 1
End If
stp = 1
Yill = Year(Cells(Bak, "B").Value)
ElseIf Cells(Bak, "D").Value = "Binek" Then
If IsDate(Cells(Bak, "E").Value) Then
Cells(Bak, "F").Value = DateAdd("YYYY", 2, Cells(Bak, "E").Value)
GoTo 1
End If
Tarih = DateAdd("YYYY", 3, Cells(Bak, "B").Value)
If Tarih > Date Then
Cells(Bak, "F").Value = Tarih
Yill = Year(Tarih)
GoTo 1
Else
stp = 2
Yill = Year(Tarih)
End If
End If
For Yil = Yill To Year(Now) + 4 Step stp
Tarih = DateSerial(Yil, Month(Cells(Bak, "B").Value), Day(Cells(Bak, "B").Value))
If Tarih > Date Then
Cells(Bak, "F").Value = Tarih
Exit For
End If
Next
1:
Next
MsgBox "Tamamlandı."
End Sub
ellerinize sağlık. çok teşekkür ederim.Aşağıdaki kodu kullanın.
Kod:Private Sub btnMuayene_Click() Dim Bak As Long Dim Yil As Long Dim Tarih As Date Dim stp As Byte Dim Yill As Integer For Bak = 3 To Cells(Rows.Count, "B").End(xlUp).Row If Cells(Bak, "D").Value = "Ticari" Then If IsDate(Cells(Bak, "E").Value) Then Cells(Bak, "F").Value = DateAdd("YYYY", 1, Cells(Bak, "E").Value) GoTo 1 End If stp = 1 Yill = Year(Cells(Bak, "B").Value) ElseIf Cells(Bak, "D").Value = "Binek" Then If IsDate(Cells(Bak, "E").Value) Then Cells(Bak, "F").Value = DateAdd("YYYY", 2, Cells(Bak, "E").Value) GoTo 1 End If Tarih = DateAdd("YYYY", 3, Cells(Bak, "B").Value) If Tarih > Date Then Cells(Bak, "F").Value = Tarih Yill = Year(Tarih) GoTo 1 Else stp = 2 Yill = Year(Tarih) End If End If For Yil = Yill To Year(Now) + 4 Step stp Tarih = DateSerial(Yil, Month(Cells(Bak, "B").Value), Day(Cells(Bak, "B").Value)) If Tarih > Date Then Cells(Bak, "F").Value = Tarih Exit For End If Next 1: Next MsgBox "Tamamlandı." End Sub
Ali bey burada bir hata tespit ettim ama çözemedim. altta dosyayı da ekliyorum.Aşağıdaki kodu kullanın.
Kod:Private Sub btnMuayene_Click() Dim Bak As Long Dim Yil As Long Dim Tarih As Date Dim stp As Byte Dim Yill As Integer For Bak = 3 To Cells(Rows.Count, "B").End(xlUp).Row If Cells(Bak, "D").Value = "Ticari" Then If IsDate(Cells(Bak, "E").Value) Then Cells(Bak, "F").Value = DateAdd("YYYY", 1, Cells(Bak, "E").Value) GoTo 1 End If stp = 1 Yill = Year(Cells(Bak, "B").Value) ElseIf Cells(Bak, "D").Value = "Binek" Then If IsDate(Cells(Bak, "E").Value) Then Cells(Bak, "F").Value = DateAdd("YYYY", 2, Cells(Bak, "E").Value) GoTo 1 End If Tarih = DateAdd("YYYY", 3, Cells(Bak, "B").Value) If Tarih > Date Then Cells(Bak, "F").Value = Tarih Yill = Year(Tarih) GoTo 1 Else stp = 2 Yill = Year(Tarih) End If End If For Yil = Yill To Year(Now) + 4 Step stp Tarih = DateSerial(Yil, Month(Cells(Bak, "B").Value), Day(Cells(Bak, "B").Value)) If Tarih > Date Then Cells(Bak, "F").Value = Tarih Exit For End If Next 1: Next MsgBox "Tamamlandı." End Sub
Private Sub btnMuayene_Click()
Dim Bak As Long
Dim Yil As Long
Dim Tarih As Date
Dim stp As Byte
Dim Yill As Integer
For Bak = 3 To Cells(Rows.Count, "B").End(xlUp).Row
If Cells(Bak, "D").Value = "Ticari" Then
stp = 1
If IsDate(Cells(Bak, "E").Value) Then
Tarih = Cells(Bak, "E").Value
Else
Tarih = Cells(Bak, "B").Value
End If
ElseIf Cells(Bak, "D").Value = "Binek" Then
stp = 2
If IsDate(Cells(Bak, "E").Value) Then
Tarih = Cells(Bak, "E").Value
Else
Tarih = DateAdd("YYYY", 3, Cells(Bak, "B").Value)
If Tarih > Date Then
Cells(Bak, "F").Value = Tarih
GoTo 1
Else
Yill = Year(Tarih)
End If
End If
End If
For Yil = Year(Tarih) To Year(Now) + 4 Step stp
Tarih = DateSerial(Yil, Month(Tarih), Day(Tarih))
If Tarih > Date Then
Cells(Bak, "F").Value = Tarih
Exit For
End If
Next
1:
Next
MsgBox "Tamamlandı."
End Sub
süper.Deneyiniz.
Kod:Private Sub btnMuayene_Click() Dim Bak As Long Dim Yil As Long Dim Tarih As Date Dim stp As Byte Dim Yill As Integer For Bak = 3 To Cells(Rows.Count, "B").End(xlUp).Row If Cells(Bak, "D").Value = "Ticari" Then stp = 1 If IsDate(Cells(Bak, "E").Value) Then Tarih = Cells(Bak, "E").Value Else Tarih = Cells(Bak, "B").Value End If ElseIf Cells(Bak, "D").Value = "Binek" Then stp = 2 If IsDate(Cells(Bak, "E").Value) Then Tarih = Cells(Bak, "E").Value Else Tarih = DateAdd("YYYY", 3, Cells(Bak, "B").Value) If Tarih > Date Then Cells(Bak, "F").Value = Tarih GoTo 1 Else Yill = Year(Tarih) End If End If End If For Yil = Year(Tarih) To Year(Now) + 4 Step stp Tarih = DateSerial(Yil, Month(Tarih), Day(Tarih)) If Tarih > Date Then Cells(Bak, "F").Value = Tarih Exit For End If Next 1: Next MsgBox "Tamamlandı." End Sub