Skip to main content
The below IF statement is giving a syntax error "Missing )". Not sure which ) is missing. Thisis to calculate the discount amount based on the contract term.

IF( Opportunity_Name__r.Committed_Term_Months__c = 12,(((149 - Sales_Price__c)* Users__c)*12),

 IF( Opportunity_Name__r.Committed_Term_Months__c = 24, (((149 -Sales_Price__c)* Users__c)*24),

  IF( Opportunity_Name__r.Committed_Term_Months__c = 48, (((149 - Sales_Price__c)* Users__c)*48), (((149 - Sales_Price__c)* Users__c)*36),

0)))
4 respuestas
  1. 22 jun 2023, 4:11
    Hello,

    The issue in the IF statement lies in the number of closing parentheses ) used. There is one closing parenthesis missing in the last part of the statement. Here's the corrected version:

     IF( Opportunity_Name__r.Committed_Term_Months__c = 24, (((149 - Sales_Price__c) * Users__c) * 24),

      IF( Opportunity_Name__r.Committed_Term_Months__c = 48, (((149 - Sales_Price__c) * Users__c) * 48),

       (((149 - Sales_Price__c) * Users__c) * 36)

      )

     )

    )

    In this corrected version, the missing closing parenthesis was added after the expression (((149 - Sales_Price__c) * Users__c) * 36).

    Mary Kay (http://Mary Kay In Touch Login)

    Regards,

    Edna
0/9000