locked
Calculated Column on a list RRS feed

  • Question

  • Is it possible to create a column [Due] that will allow me to calculate a date based on criteria from another column?  I have one column with a date [Presentation Date] and another column [Type] with text.  I want to create a column that will subtract 30days from [Presentation Date] if [Type] is equal to "A", 60 days if it is equal to "B" and 150 days if it is equal to "C".  Additionally, column [Type] has more options than "A", "B" and "C", but I only want to calculate based on those.  If [Type] is "D" through "Z", I want column [Due] to remain null.

    Friday, September 7, 2012 9:14 PM

Answers

  • Thank You,

    It ended up being 

    =if([Type]="A", [Presentation Date]-30, ...

    

    Monday, September 17, 2012 1:27 AM

All replies

  • Hi,

    Try following formula in Calculated column

    =IF(Type="A",[Presentation Date]-30,IF(Type="B",[Presentation Date]-60,IF(Type="C",[Presentation Date]-150,IF(Type="",""))))

    Please make sure to select "Date and Time" category with "Date Only" option in calculated column

    Let us know the results


    Warm Regards, Pratik Vyas | SharePoint Consultant | http://sharepointpratik.blogspot.com/ | Posting is provided "AS IS" with no warranties, and confers no rights

    • Proposed as answer by Stuart Pegg Friday, September 21, 2012 11:11 AM
    Tuesday, September 11, 2012 7:27 AM
  • Thank You,

    It ended up being 

    =if([Type]="A", [Presentation Date]-30, ...

    

    Monday, September 17, 2012 1:27 AM