If close date is not this year, amount this year = 0

If close date is this year, amount this year = Setup cost + (Monthly amount x number of whole months between the close date and the end of the year)

Eg, if the setup was £10k, monthly amount £2k, and close date 14/7, the calculation would be: £10k + (£2k x 5) = £20k

And when we move into 2015, we need to ensure the calculation works as we move into the next year.

2 Answers 2


The formula to return the number of whole months remaining in the year is just:

12 - MONTH(CloseDate)

and you can use the YEAR function to do the year matching part giving you a multiplier factor field of:

IF(YEAR(CloseDate) == YEAR(TODAY()), 12 - MONTH(CloseDate), 0)

(And of course you can incorporate the other values in that one formula or in a further formula field.)


I am not sure what exactly you are looking for ,because you have the answer itself.

But what I understood I am giving you a sample (not code i.e. not working code).

Let me know in case of any queries or correct me If I am wrong

    int totalAmount=0; 
          int reaminingMonth=12-ClosedDate.Month;
          totalAmount=totalAmount+SetupCost+(monthly_amount* reaminingMonth);
   {//do what you want  }

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .