I am trying to create a formula that will calculate 30 business days from a given date. I found a formula from an article that I might can use but I do not understand it. This was the article http://blog.proton7group.com/2020/02/formulas-for-adding-business-days.html
CASE(
WEEKDAY(date_field__c),
1, (date_field__c) + number_of_days__c +
FLOOR((number_of_days__c-1)/5)*2,
2, (date_field__c) + number_of_days__c +
FLOOR((number_of_days__c)/5)*2,
3, (date_field__c) + number_of_days__c +
FLOOR((number_of_days__c+1)/5)*2,
4, (date_field__c) + number_of_days__c +
FLOOR((number_of_days__c+2)/5)*2,
5, (date_field__c) + number_of_days__c +
FLOOR((number_of_days__c+3)/5)*2,
6, (date_field__c) + number_of_days__c +
CEILING((number_of_days__c)/5)*2,
7, (date_field__c) - IF(number_of_days__c>0,1,0) + number_of_days__c +
CEILING((number_of_days__c)/5)*2,
null)
@Keiji Otsubo Still had a bit of trouble with that formula using the WEEKDAY function. I was able to get it working with this formula! Thank you for your help
CASE(
MOD(Date__c - DATE(1900,1,7),7),
0,Date__c + 40,
1,Date__c + 42,
2,Date__c + 42,
3,Date__c + 42,
4,Date__c + 42,
5,Date__c + 42,
6,Date__c + 41,
Date__c + 42)