• Shannon Donnelly
  • NEWBIE
  • 10 Points
  • Member since 2017

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 1
    Replies
I am trying to write an IF AND formula that calculates a compounded contract value based on the number of years the contract has been in effect. Several sites have expections and have a straightline contract value for the first few years and then every year there after has a escaltor applied to it., but I keep recieving the following :
  • ERROR: Incorrect number of paramenters for function "IF()". Expected 3, recieved 2
I am relativitly new to this, so any help or suggestions on how I can better write this formula will be greatly appreciated.

The formula, so far reads, as :

IF( AND( Name  = 'Goya Foods, Inc - Jersey City' ,  EMS_Contract_Year__c   <= 6) ,
   EMS_Contract_Amount__c  ,   
IF( AND ( Name  = 'Goya Foods, Inc - Jersey City',  EMS_Contract_Year__c   >  6), 
   (EMS_Contract_Amount__c  * ((1 + ( Escalator__c)) ^ ( EMS_Contract_Year__c  - 6)))),
IF( AND( Name  = 'Goya Foods, Inc – Secaucus' , EMS_Contract_Year__c   <= 6) ,  
   EMS_Contract_Amount__c,
IF( AND( Name  = 'Goya Foods, Inc - Secaucus',  EMS_Contract_Year__c   >  6),
  (EMS_Contract_Amount__c  * ((1 + ( Escalator__c)) ^ ( EMS_Contract_Year__c  - 6)))),
IF( AND( Name = 'LEVIN_MANAGEMENT_CORPORATION-',  EMS_Contract_Year__c  <= 3),  
  EMS_Contract_Amount__c,
IF( AND( Name = 'LEVIN_MANAGEMENT_CORPORATION-',  EMS_Contract_Year__c   >  3), 
  (EMS_Contract_Amount__c  * ((1 + ( Escalator__c)) ^ ( EMS_Contract_Year__c  - 3)))),
(EMS_Contract_Amount__c  * ((1 + ( Escalator__c)) ^ ( EMS_Contract_Year__c  - 1))))))
 
I am trying to write an IF AND formula that calculates a compounded contract value based on the number of years the contract has been in effect. Several sites have expections and have a straightline contract value for the first few years and then every year there after has a escaltor applied to it., but I keep recieving the following :
  • ERROR: Incorrect number of paramenters for function "IF()". Expected 3, recieved 2
I am relativitly new to this, so any help or suggestions on how I can better write this formula will be greatly appreciated.

The formula, so far reads, as :

IF( AND( Name  = 'Goya Foods, Inc - Jersey City' ,  EMS_Contract_Year__c   <= 6) ,
   EMS_Contract_Amount__c  ,   
IF( AND ( Name  = 'Goya Foods, Inc - Jersey City',  EMS_Contract_Year__c   >  6), 
   (EMS_Contract_Amount__c  * ((1 + ( Escalator__c)) ^ ( EMS_Contract_Year__c  - 6)))),
IF( AND( Name  = 'Goya Foods, Inc – Secaucus' , EMS_Contract_Year__c   <= 6) ,  
   EMS_Contract_Amount__c,
IF( AND( Name  = 'Goya Foods, Inc - Secaucus',  EMS_Contract_Year__c   >  6),
  (EMS_Contract_Amount__c  * ((1 + ( Escalator__c)) ^ ( EMS_Contract_Year__c  - 6)))),
IF( AND( Name = 'LEVIN_MANAGEMENT_CORPORATION-',  EMS_Contract_Year__c  <= 3),  
  EMS_Contract_Amount__c,
IF( AND( Name = 'LEVIN_MANAGEMENT_CORPORATION-',  EMS_Contract_Year__c   >  3), 
  (EMS_Contract_Amount__c  * ((1 + ( Escalator__c)) ^ ( EMS_Contract_Year__c  - 3)))),
(EMS_Contract_Amount__c  * ((1 + ( Escalator__c)) ^ ( EMS_Contract_Year__c  - 1))))))