KuTuKa
Altın Üye
- Katılım
- 10 Mart 2005
- Mesajlar
- 750
- Excel Vers. ve Dili
- Microsoft Office LTSC Pr. Pl 2021 - 64 bit Türkçe
DOSYA İndirmek/Yüklemek için ÜCRETLİ ALTIN ÜYELİK Gereklidir!
Altın Üyelik Hakkında Bilgi
g3 hücreside hesaplarken sabit diğer aylara yansıtılması geeken tutar 135,83 dür yani ben 2300 dediğimde 135,83 tl lik tutar olduğunu bilecek g3 hücresinde
diğer kodlar içinde durum aynıdır.
2300t için son tarihi nereden buldunuz_?
Bu tarihi nasıl bulabilirim ben yada excel nasıl bulacak.
2300 girdiğimde son tarih 311.12.2012 olmalı bu değişmeyecek hangi ayda girersem gireyim son tarih 31.12.2012 olacak
seneye 2013 de
ocak da girdiğimde son tarih 31.12.2013 olacak
koda göre en son tarihin 31.12 olması gerekiyor çünkü belgenin son tarihi o
ben yanlış anlamışım pardon
2300 yazdığında son tarih 31.12.2012
2300t yazığında son tarih 31.03.2013
2310 yazdığında son tarih 30.06.2013
gelen poliçelerin son işlenme tarihleri bunlar o yüzden kodlar yazıldığında son tarihler yukarıdaki gibi oluyor
Option Explicit
Private Sub Worksheet_Change(ByVal Target As Range)
Application.EnableEvents = False
If Intersect(Target, Range("F:F")) Is Nothing Then _
Application.EnableEvents = True: Exit Sub
Dim KL As Long
If Target = 2300 Then
Cells(Target.Row, "D") = DateSerial(Year(Date), Month(Date), 1)
Cells(Target.Row, "E") = DateSerial(Year(Date), Month(Date) + 1, 0)
Cells(Target.Row + 1, "D") = DateSerial(Year(Date), Month(Date) + 1, 1)
Cells(Target.Row + 1, "E") = DateSerial(Year(Date), 12, 31)
Cells(Target.Row + 1, "F") = Target
Cells(Target.Row + 1, "G") = "135,83" + 0
KL = Month(Cells(Target.Row + 1, "E") - Cells(Target.Row + 1, "D"))
Cells(Target.Row, "G") = Cells(Target.Row, "J") - Cells(Target.Row + 1, "G") * KL
ElseIf Target = "2300T" Then
Cells(Target.Row, "D") = DateSerial(Year(Date), Month(Date), 1)
Cells(Target.Row, "E") = DateSerial(Year(Date), Month(Date) + 1, 0)
KL = Month(Date)
If KL > 3 Then
Cells(Target.Row + 1, "D") = DateSerial(Year(Date), Month(Date) + 1, 1)
Cells(Target.Row + 1, "E") = DateSerial(Year(Date) + 1, 3, 31)
Else
Cells(Target.Row + 1, "D") = DateSerial(Year(Date), Month(Date) + 1, 1)
Cells(Target.Row + 1, "E") = DateSerial(Year(Date), 3, 31)
End If
Cells(Target.Row + 1, "F") = Target
Cells(Target.Row + 1, "G") = "34" + 0
KL = Month(Cells(Target.Row + 1, "E") - Cells(Target.Row + 1, "D"))
Cells(Target.Row, "G") = Cells(Target.Row, "J") - Cells(Target.Row + 1, "G") * KL
ElseIf Target = "2310" Then
Cells(Target.Row, "D") = DateSerial(Year(Date), Month(Date), 1)
Cells(Target.Row, "E") = DateSerial(Year(Date), Month(Date) + 1, 0)
KL = Month(Date)
If KL > 6 Then
Cells(Target.Row + 1, "D") = DateSerial(Year(Date), Month(Date) + 1, 1)
Cells(Target.Row + 1, "E") = DateSerial(Year(Date) + 1, 6, 30)
Else
Cells(Target.Row + 1, "D") = DateSerial(Year(Date), Month(Date) + 1, 1)
Cells(Target.Row + 1, "E") = DateSerial(Year(Date), 6, 30)
End If
Cells(Target.Row + 1, "F") = Target
Cells(Target.Row + 1, "G") = "6,25" + 0
KL = Month(Cells(Target.Row + 1, "E") - Cells(Target.Row + 1, "D")) + 1
Cells(Target.Row, "G") = Cells(Target.Row, "J") - Cells(Target.Row + 1, "G") * KL
End If
Application.EnableEvents = True
End Sub
diyelim ki poliçe şubatta geldi ve tutarı 1450 tl
ben excel 2300 girersem
01.02.2013-29.02.2013 girilip dğer ay 01.03.2013 - 31.12.2013 olacak
mart da geldiyse 01.03.2013 - 31.03.2013 olacak sonraki dönem 01.04.2013 - 31.12.2013 olmalı
burada önemli olan son tarihin olduğu satır,burada excel kaç ay olduğunu saymalı nisan la aralık ayı arası 9 ay var demeli 135,83 * 9 hesaplayacak. bir üsteki satıra 1400-(135,83*9) tutarı girecek alt satır 135,83 olacak.
Bunu biraz daha anlatır mısınn_?2300 kodu için şöyle birşey olabilir mi
ocak 2013 de yeni tarih aralığını verebilir mi?
Tabikide
gelen poliçeler bir senelik 2300 koda girdiğimiz 31.12.2012 de bitiyor.
01.01.2013 2300 koda gireceğimiz yeni poliçeler gelecek onların da son tarihi 31.12.2013 olacak.
yeni yılda 2013 te
2300 yazdığında son tarih 31.12.2013
01.04.213 ten itibaren
2300t yazığında son tarih 31.03.2014
01.07.2013 ten itibaren
2310 yazdığında son tarih 30.06.2014
olacak.
işleniş mantığı yine aynı
şimdiden teşekkürler