If then formula

Hello, I am working in excel 2016. I would like to use a formula in regards to days and a project time line.

For instance if a project has 365 days, I can indicate when to start each line item- 180 days out, 60 days etc. But if I change that we only have 120 days, I need to have the lines compress to when those are to be started.

Can someone tell me what is the best way to do this in excel to I write this formula?