SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

One of our previous SharePoint Developer developed this formula for a calculated column named as "pGantt" in a SP2010 document library. I am not able to understand its syntax. The value produced by the formula is in always percentage eg. 130%, 110%, 90%, etc. Kindly explain what exactly the formula is meant for.

Many thanks in advance.

Here is the code: =IF(ISERROR(IF(ISERROR(DATEDIF(CommencementDate,Today,"m")),0,DATEDIF(CommencementDate,Today,"m"))/IF(ISERROR(DATEDIF(CommencementDate,ExpiryDate,"m")),0,DATEDIF(CommencementDate,ExpiryDate,"m"))),1,IF(ISERROR(DATEDIF(CommencementDate,Today,"m")),0,DATEDIF(CommencementDate,Today,"m"))/IF(ISERROR(DATEDIF(CommencementDate,ExpiryDate,"m")),0,DATEDIF(CommencementDate,ExpiryDate,"m")))

share|improve this question
up vote 2 down vote accepted

It calculates

(Months from CommencementDate to today)/(Months from CommencementDate to ExpiryDate)

Ie how expired the document is.

Most of it is for handling problems with data.

share|improve this answer
Thank you very much Dear Per Jakobsen – Zakir HC May 24 '12 at 9:46

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.