You need to sign in to do that
Don't have an account?
Vinitha Subramanya
Syntax error in nested IF formula
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)))
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)))
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
All Answers
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
In the provided formula, it seems that there is a missing closing parenthesis at the end of the formula. Here's the corrected version of the formula:
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)))))
So, add a closing parenthesis at the end of the formula to close the last nested IF statement.
If this helps you please mark it as a best answer,
thanks!