Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

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
add comment

1 Answer

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
add comment

Your Answer

 
discard

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.