function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
JTiekstraJTiekstra 

Exclude stages from formulas

In our Opportunities we use the following formula to calculate the day's before the close date of the Opportunity.
 
{!CloseDate} - TODAY()
 
This formula calculates also the day's after the close date .
We want to exclude some stages of the Opportunity from this formula.
We only want a result of the formula when the opportunity is not equal to the stages close lost, contract, implemented and no bid.
 
Can you help me completing the formula?
 
Thank you very much
Jeanette Tiekstra
TonkaCruiserTonkaCruiser
JTiekstra,
 
Both of the formulas below should work for you.  One requires a formula(text) field and will return a "Past Due" if TODAY is past the Due Date.  The other requires a formula(number) field and will only report the number of days until closed or no value if it is past the Due Date.  You might need to verify the text values to make sure that they match your existing values.
 
- text version -
 
IF( OR(ISPICKVAL( {!StageName} , "Closed Lost"),ISPICKVAL( {!StageName} , "Contract"),ISPICKVAL( {!StageName} , "Implemented"), ISPICKVAL( {!StageName} , "No Bid") ),NULL , IF(({!CloseDate} - TODAY()) < 0, "Past Due", TEXT({!CloseDate} - TODAY())))
 
- numeric version -
 
IF( OR(ISPICKVAL( {!StageName} , "Closed Lost"),ISPICKVAL( {!StageName} , "Contract"),ISPICKVAL( {!StageName} , "Implemented"), ISPICKVAL( {!StageName} , "No Bid") ),NULL , IF(({!CloseDate} - TODAY()) < 0, NULL, {!CloseDate} - TODAY()))
 
Chris
JTiekstraJTiekstra

Thank you Chris,

This helped me a lot.

Kind regards Jeanette Tiekstra