I would highly appreciate your ideas/help with creating a logic to make the following calcs.

From row 3 for each Company (ABC and XYZ) I need to calculate Start and End for every month.
I have data for the first month only and each next month should apply the logic
Start is E3=F2 and End is F3=E3+D3 and so on

Thanks a lot.
P.S. I’ve tried Lag Column, Column Expressions and Java Snippet (simple). The challenge I have is implementing lF…ELSE where I have logical and math conditions together.
e.g Take End value for Month 1 and insert into Start value Month 2 when i’s missing, then calculate Month 2 End.