Bende hazırlamıştım
Herkese Hayırlı Bayramlar.
https://resim.accesstr.net/do.php?img=11029
Sub kodFormul()
Dim tarh As Date, i As Integer
Dim topla1 As Integer, topla2 As Integer, topla3 As Integer
Dim cikart1 As Integer, cikart2 As Integer, cikart3 As Integer
With ThisWorkbook.Sheets("Sayfa3")
.Range("A2:A" & Rows.Count).ClearContents
For i = 2 To .Cells(Rows.Count, "D").End(3).Row
topla1 = WorksheetFunction.Sum(.Cells(i, "H"), .Cells(i, "L"))
topla2 = WorksheetFunction.Sum(.Cells(i, "i"), .Cells(i, "m"))
topla3 = WorksheetFunction.Sum(.Cells(i, "j"), .Cells(i, "n"))
cikart1 = .Cells(i, "L").Value
cikart2 = .Cells(i, "M").Value
cikart3 = .Cells(i, "N").Value
If Right(.Cells(i, "H"), 1) Mod 2 = 1 Then
tarh = DateSerial(Year(.Cells(i, "D").Value) + topla1, Month(.Cells(i, "D").Value) + topla2, Day(.Cells(i, "D").Value) + topla3)
Else
tarh = DateSerial(Year(.Cells(i, "E").Value) - cikart1, Month(.Cells(i, "E").Value) - cikart2, Day(.Cells(i, "E").Value) - cikart3)
End If
.Cells(i, "A").Value = tarh
.Range("A2:A" & Rows.Count).NumberFormat = "dd.mm.yyyy"
Next i
End With
End Sub