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
miss vmiss v 

"IF" Formula Field not calculating

I'm a little new at this, but I created a formula field that is supposed to run one forumla if the Account=X, and then run another (similar) formula if the Account<>X.  I'm not getting syntax errors, but the actual field doesn't calculate any differently when I add it to the report. 
 
Basically, I'm trying to subsitute "CPC_ING_TRM_LIFE_25_c" (instead of ING_c) when the Account name is CPC.  However, it's calculating the second formula with the ING_c for all Account names (including CPC).  Can anyone tell me why it's not working?   
 
 
IF( Account__c="CPC", AIG__c + AUL__c + BM__c + CPC_ING_TRM_LIFE_25__c + Htfd__c + Other__c + ReliStnd__c + UNUM__c, AIG__c + AUL__c + BM__c + Htfd__c + Other__c + ReliStnd__c + UNUM__c+ ING__c)
smoodysmoody
From the looks of your formula, you only have the IF portion without a THEN statement. You should add a THEN statement to direct the formula if the IF statement is not true.

Example:
IF( Account__c = "CPC", Calculation if true, Calulation if false)

Your current formula looks like:  IF( Account__c = "CPC", Calculation if true)

Harry JamesHarry James

smoody -  The OP's situation is a bit more complicated - the field apparently is in a custom object with master-detail relationship to the Account object.  The only suggestion I could come up with is pretty ugly.  Any other thoughts?

Take a look at the last 6 posts on this thread:

http://community.salesforce.com/sforce/board/message?board.id=custom_formula&message.id=557

 

miss vmiss v
There is a comma in there, that separates the true and false calculations.  It's sorta hard to see with all the fields being calculated.  However, as Harry pointed out, it appears my real problem is realted to the custom object master-detail field.  When i run the formula, it's not recognizing the Account_c= "CPC" portion of my IF statement.