I was hoping someone can help me move along. I am trying to add multiple IF Statements within one formula and the error I am getting is: Syntax error. Missing ')'
My Formula:
IF(ISBLANK( App_Organization_Type__c,NULL,
IF( App_Organization_Type__c = "Law Firm",
IF( App_Number_Of_Employees__c = "1-5","Very Small",
IF( App_Number_Of_Employees__c = "6-10","Small",
IF( App_Number_Of_Employees__c = "11-25","Medium",
IF( App_Number_Of_Employees__c = "26-50","Large",
IF( App_Number_Of_Employees__c = "51-150","Very Large",
IF( App_Number_Of_Employees__c = "More than 150","Very Large","Unknown")))))),
IF( App_Organization_Type__c = "Government",
IF( App_Number_Of_Employees__c = "1-99","Very Small",
IF( App_Number_Of_Employees__c = "100-999","Small",
IF( App_Number_Of_Employees__c = "1,000-4,999","Medium",
IF( App_Number_Of_Employees__c = "5,000-9,999","Large",
IF( App_Number_Of_Employees__c = "More than 10,000","Very Large","Unknown"))))),
IF( App_Organization_Type__c = "Corporation",
IF( App_Number_Of_Employees__c = "1-99","Very Small",
IF( App_Number_Of_Employees__c = "100-999","Small",
IF( App_Number_Of_Employees__c = "1,000-4,999","Medium",
IF( App_Number_Of_Employees__c = "5,000-9,999","Large",
IF( App_Number_Of_Employees__c = "More than 10,000","Very Large","Unknown"))))),
IF( App_Organization_Type__c = "University",
IF( App_Number_Of_Employees__c = "1-99","Very Small",
IF( App_Number_Of_Employees__c = "100-999","Small",
IF( App_Number_Of_Employees__c = "1,000-4,999","Medium",
IF( App_Number_Of_Employees__c = "5,000-9,999","Large",
IF( App_Number_Of_Employees__c = "More than 10,000","Very Large","Unknown"))))),"")
With that many repetitions of the fields (App_Number_Of_Employees__c & App_Organization_Type__c ), you will certainly hit the Compile Size. I would use an optimized version like this -
IF(
ISBLANK(App_Organization_Type__c), NULL,
CASE(
App_Organization_Type__c + ":" + App_Number_Of_Employees__c,
"Law Firm:1-5", "Very Small",
"Law Firm:6-10", "Small",
"Law Firm:11-25", "Medium",
"Law Firm:26-50", "Large",
"Law Firm:51-150", "Very Large",
"Law Firm:More than 150", "Very Large",
"Government:1-99", "Very Small",
"Government:100-999", "Small",
"Government:1,000-4,999", "Medium",
"Government:5,000-9,999", "Large",
"Government:More than 10,000", "Very Large",
"Corporation:1-99", "Very Small",
"Corporation:100-999", "Small",
"Corporation:1,000-4,999", "Medium",
"Corporation:5,000-9,999", "Large",
"Corporation:More than 10,000", "Very Large",
"University:1-99", "Very Small",
"University:100-999", "Small",
"University:1,000-4,999", "Medium",
"University:5,000-9,999", "Large",
"University:More than 10,000", "Very Large",
"Unknown"
)
)
Remember if they are Picklist fields, you will need to replace all API Name occurrences like this -
TEXT(Picklist_Field_API_Name__c)