Stump the Panel » End Users and Information Workers

Multiple functions in a formula

(4 posts)
  • Started 2 days ago by amber0579
  • Latest reply from amber0579
  1. amber0579
    Member

    I tried to follow a few of the different suggestions, but now it is retrun a #NUM! error. The first hald of my formula is working it is the second half that is causing the error.

    Here is what I am looking for:
    DATE CLOSED <= SUBMISSION DATE TO RETURN 1
    DATE CLOSED - SUBMISSION DATE = # OF DAYS

    Here is the formula I have right now.
    =IF([DATE CLOSED]<=[SUBMISSION DATE],1,DATEDIF([DATE CLOSED],[SUBMISSION DATE],"D"))

    Please help as I am teaching myself SharePoint

    Posted 2 days ago #
  2. That looks good to me but maybe Dessie can take a look at it. (Moving out of jQuery section)

    Posted 2 days ago #
  3. Try reversing the two column references in the "DATEDIF" function.

    In your formula you're looking to see if the "DATE CLOSED" value is less than or equal to the "SUBMISSION DATE" value. If its not, you need to calculate the difference between them - this would make the "DATE CLOSED" field greater than the "SUBMISSION DATE" field, which in turn make the "SUBMISSION DATE" field the "Start Date" for the "DATEDIF" function (not the "DATE CLOSED" field).

    Reversing them should work:

    =IF([DATE CLOSED]<=[SUBMISSION DATE],1,DATEDIF([SUBMISSION DATE],[DATE CLOSED],"D"))

    - Dessie

    Posted 1 day ago #
  4. amber0579
    Member

    Thank you! This worked perfectly! TYTYTYTYTYTY

    Posted 1 day ago #

RSS feed for this topic

Reply

You must log in to post.