# Formula help for different groups based off of days out from a certain launch date

Hi Everyone,

I’m have a ton of trouble with a formula that I need to create…

We have tasks split into specific groups based on a certain number of ‘weeks out’ from a ‘Launch Date’. I am trying to create a formula that will subtract ‘x’ days from a ‘launch date’ based on what group the tasks align too. For example…

If the Launch Date is 10/1/2024 and the tasks are in either the 40, 30, or 20 weeks out group… the ‘week of’ formula will produce the week the tasks need to kick off based on how many days away we are from the "Launch Date’. (20 weeks=280 days, 30 weeks=210 days, 20 weeks=140 days)

I was able to figure it out with just one formula but I need it to sequentially adjust based on the group…

I hope this made sense. I was trying to play around with IF statements.

Hi Derrick,

Not sure I fully understand your requirements, but if you need to extract the 40, 30, 20 from the group name in a formula column, you can do it this way:

``````INT(REGEXEXTRACT({Group},"\d+")))
``````

Then you can multiply by 7:

``````MULTIPLY(7,INT(REGEXEXTRACT({Group},"\d+"))))
``````

Then you can add that number of days to a date, not sure if you need to add it to the launch date, but if it is the case:

``````ADD_DAYS({Launch Date},MULTIPLY(7,INT(REGEXEXTRACT({Group},"\d+")))))
``````

Hope this helps,

What if we could break free of the Formula column and write formulas that update any type of columns? What if a formula could update multiple columns at once? This is possible with the Advanced Formula Booster app.