# Exclude weekends from formula column when subtracting date and number columns

Hey everyone, has anyone figured out how to exclude weekends from formula columns when calculating a new date from a date - number column? Excluding weekends from timeline column obviously doesn’t help here, and can’t remove weekends from a whole account yet… Have checked other posts and have not been able to figure it out. Here is how far I got, thanks in advance!

Hey Bruce!

Let me know how this goes?

`IF(WEEKDAY({Date}) <= MOD({Lead time},5), DATE(YEAR({Date})-1, MONTH({Date}), DAY({Date}) + 365 - {Lead time} - (2*(ROUNDDOWN(({Lead time}) / 5, 0)+1))), IF(WEEKDAY(DATE(YEAR({Date})-1, MONTH({Date}), DAY({Date}) + 365 - {Lead time} - (2*ROUNDDOWN(({Lead time}) / 5, 0)))) = 1, DATE(YEAR({Date})-1, MONTH({Date}), DAY({Date}) -2 + 365 - {Lead time} - (2*ROUNDDOWN(({Lead time}) / 5, 0))), IF(WEEKDAY(DATE(YEAR({Date})-1, MONTH({Date}), DAY({Date}) + 365 - {Lead time} - (2*ROUNDDOWN(({Lead time}) / 5, 0)))) = 7, DATE(YEAR({Date})-1, MONTH({Date}), DAY({Date}) - 1 + 365 - {Lead time} - (2*ROUNDDOWN(({Lead time}) / 5, 0))), DATE(YEAR({Date})-1, MONTH({Date}), DAY({Date}) + 365 - {Lead time} - (2*ROUNDDOWN(({Lead time}) / 5, 0))))))`

Just replace Date field and lead time field with your columns. Let me know how you go!

1 Like

Thanks Bianca! I found same thing in Formula use cases, and it works :). pasted it in a google doc and used Ctrl+H to replace all those ‘{Date}’ references. Here it is if anyone else is doing the same thing.