+ Reply to Thread
Results 1 to 3 of 3

proper syntax order

  1. #1
    Roberta H via OfficeKB.com
    Guest

    proper syntax order

    Hello all, I have three fields

    "ReceivedDate"
    "Date"
    "Total Days"

    The first two are date fields, the second I want to either count the number
    of days between the dates or if no "Date" than "Total Days" would should "0".


    "Date" - "ReceivedDate" = "Total Days"
    2/6/06 - 1/12/06 = 25
    This works - if that's all I needed, however,

    "Date" - "ReceivedDate" = "TotalDays", If "Date" is blank, then "TotalDays" =
    0
    I can't get the right order to make this simple formula work.
    Please help.
    Thank you.

    --
    Message posted via http://www.officekb.com

  2. #2
    Valued Forum Contributor
    Join Date
    03-25-2004
    Location
    Boston, MA US
    Posts
    1,094
    Roberta,

    Assuming A1= "Date", B1 = "Received Date" & C1 = "Total Days" then in C2 enter:

    =IF(ISBLANK(A2),0,DATEDIF(B2,A2,"d"))

    HTH

    Steve

  3. #3
    Roberta H via OfficeKB.com
    Guest

    Re: proper syntax order

    Thank you so very much Steve!
    Yes it works great! One problem I had, however, was getting an accurate
    count from the very date received to the "date", so I made a very small
    modification to the formula:
    =IF(ISBLANK(H191),0,DATEDIF(G191-1,H191,"d")).

    **************************************

    SteveG wrote:
    >Roberta,
    >
    >Assuming A1= "Date", B1 = "Received Date" & C1 = "Total Days" then in
    >C2 enter:
    >
    >=IF(ISBLANK(A2),0,DATEDIF(B2,A2,"d"))
    >
    >HTH
    >
    >Steve
    >


    --
    Message posted via http://www.officekb.com

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1