You need to sign in to do that
Don't have an account?
Chad Ritchie
Nested If Formula Not Working
Hey guys,
I appreciate all the help I can get,
Here's my formula :
IF(ISBLANK(IF(Length_of_Strategy_String__c <50,(LEFT( Strategy_just_used_for_update_email__c , LEN( Strategy_just_used_for_update_email__c ) - 4)),IF(AND( Length_of_Strategy_String__c >50, Length_of_Strategy_String__c <56),(LEFT( Strategy_just_used_for_update_email__c , LEN( Strategy_just_used_for_update_email__c ) - 4)),IF( Length_of_Strategy_String__c >56,(LEFT( Strategy_just_used_for_update_email__c , LEN(Strategy_just_used_for_update_email__c ) - 4)))))),IF(Length_of_Strategy_String__c <50,(LEFT( Strategy_just_used_for_update_email__c , LEN( Strategy_just_used_for_update_email__c ) - 4)),IF(AND( Length_of_Strategy_String__c >50, Length_of_Strategy_String__c <56),(LEFT( Strategy_just_used_for_update_email__c , LEN( Strategy_just_used_for_update_email__c ) - 4)),IF( Length_of_Strategy_String__c >56,(LEFT( Strategy_just_used_for_update_email__c , LEN(Strategy_just_used_for_update_email__c ) - 4))))),GAI)
And here's the error: Error: Incorrect number of parameters for function 'IF()'. Expected 3, received 2
I know it's very close, I just can't figure out where the error's coming from.
Thanks!
I appreciate all the help I can get,
Here's my formula :
IF(ISBLANK(IF(Length_of_Strategy_String__c <50,(LEFT( Strategy_just_used_for_update_email__c , LEN( Strategy_just_used_for_update_email__c ) - 4)),IF(AND( Length_of_Strategy_String__c >50, Length_of_Strategy_String__c <56),(LEFT( Strategy_just_used_for_update_email__c , LEN( Strategy_just_used_for_update_email__c ) - 4)),IF( Length_of_Strategy_String__c >56,(LEFT( Strategy_just_used_for_update_email__c , LEN(Strategy_just_used_for_update_email__c ) - 4)))))),IF(Length_of_Strategy_String__c <50,(LEFT( Strategy_just_used_for_update_email__c , LEN( Strategy_just_used_for_update_email__c ) - 4)),IF(AND( Length_of_Strategy_String__c >50, Length_of_Strategy_String__c <56),(LEFT( Strategy_just_used_for_update_email__c , LEN( Strategy_just_used_for_update_email__c ) - 4)),IF( Length_of_Strategy_String__c >56,(LEFT( Strategy_just_used_for_update_email__c , LEN(Strategy_just_used_for_update_email__c ) - 4))))),GAI)
And here's the error: Error: Incorrect number of parameters for function 'IF()'. Expected 3, received 2
I know it's very close, I just can't figure out where the error's coming from.
Thanks!
You haven't written the Else condition of the bold if statement. Check it out:
IF( ISBLANK(IF(Length_of_Strategy_String__c < 50,
(LEFT( Strategy_just_used_for_update_email__c , LEN( Strategy_just_used_for_update_email__c ) - 4)),
IF( AND(Length_of_Strategy_String__c >50, Length_of_Strategy_String__c <56),
(LEFT( Strategy_just_used_for_update_email__c , LEN( Strategy_just_used_for_update_email__c ) - 4)),
IF( Length_of_Strategy_String__c >56,
(LEFT( Strategy_just_used_for_update_email__c , LEN(Strategy_just_used_for_update_email__c ) - 4)),
//Add Here Else Condition
)
)
)
),
IF(Length_of_Strategy_String__c <50,
(LEFT( Strategy_just_used_for_update_email__c , LEN( Strategy_just_used_for_update_email__c ) - 4)),
IF(AND( Length_of_Strategy_String__c >50, Length_of_Strategy_String__c <56),
(LEFT( Strategy_just_used_for_update_email__c , LEN( Strategy_just_used_for_update_email__c ) - 4)),
IF( Length_of_Strategy_String__c >56,
(LEFT( Strategy_just_used_for_update_email__c , LEN(Strategy_just_used_for_update_email__c ) - 4)),
//Add Here Else Condition
)
)
)
,GAI
)
Please mark this as best answer if you find it helpful
Thanks,
Jolly Birdi
All Answers
You haven't written the Else condition of the bold if statement. Check it out:
IF( ISBLANK(IF(Length_of_Strategy_String__c < 50,
(LEFT( Strategy_just_used_for_update_email__c , LEN( Strategy_just_used_for_update_email__c ) - 4)),
IF( AND(Length_of_Strategy_String__c >50, Length_of_Strategy_String__c <56),
(LEFT( Strategy_just_used_for_update_email__c , LEN( Strategy_just_used_for_update_email__c ) - 4)),
IF( Length_of_Strategy_String__c >56,
(LEFT( Strategy_just_used_for_update_email__c , LEN(Strategy_just_used_for_update_email__c ) - 4)),
//Add Here Else Condition
)
)
)
),
IF(Length_of_Strategy_String__c <50,
(LEFT( Strategy_just_used_for_update_email__c , LEN( Strategy_just_used_for_update_email__c ) - 4)),
IF(AND( Length_of_Strategy_String__c >50, Length_of_Strategy_String__c <56),
(LEFT( Strategy_just_used_for_update_email__c , LEN( Strategy_just_used_for_update_email__c ) - 4)),
IF( Length_of_Strategy_String__c >56,
(LEFT( Strategy_just_used_for_update_email__c , LEN(Strategy_just_used_for_update_email__c ) - 4)),
//Add Here Else Condition
)
)
)
,GAI
)
Please mark this as best answer if you find it helpful
Thanks,
Jolly Birdi