Calculate work order aging with IF statement for blanks.
Results 1 to 4 of 4

Thread: Calculate work order aging with IF statement for blanks.
Thanks Thanks: 0 Likes Likes: 0

  1. #1
    New Member
    Join Date
    Aug 2019
    Posts
    2
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Calculate work order aging with IF statement for blanks.

    Hello.

    I need to calculate the age of a work order using the start date (a2) and end date (b2). The “open” work orders will have a blank end date.

    I want to write a formula that will use today’s date as the end date if the end date cell is blank. I’m assuming I use an IF statement, but not sure how to write it.

  2. #2
    MrExcel MVP
    Join Date
    May 2009
    Posts
    16,361
    Post Thanks / Like
    Mentioned
    36 Post(s)
    Tagged
    8 Thread(s)

    Default Re: Calculate work order aging with IF statement for blanks.

    =if(b2="",today()-a2,b2-a2)
    Joe

    When I was a young man I knew everything. Now that I'm older, I realize I know very little, and what I do know, I tend to forget!

  3. #3
    New Member
    Join Date
    Aug 2019
    Posts
    2
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Re: Calculate work order aging with IF statement for blanks.

    Quote Originally Posted by JoeMo View Post
    =if(b2="",today()-a2,b2-a2)
    Thank you!!’

  4. #4
    Board Regular sandy666's Avatar
    Join Date
    Oct 2015
    Posts
    2,660
    Post Thanks / Like
    Mentioned
    25 Post(s)
    Tagged
    1 Thread(s)

    Cool Re: Calculate work order aging with IF statement for blanks.

    another way

    A
    B
    C
    D
    1
    StartDate EndDate Age
    2
    10/07/2019
    20/07/2019
    10
    =IFERROR(CHOOSE(MATCH(--ISBLANK(B2),{0,1},0),DATEDIF(A2,B2,"d"),DATEDIF(A2,TODAY(),"d")),"")
    3
    20/07/2019
    30/07/2019
    10
    4
    30/07/2019
    10/08/2019
    11
    5
    10/08/2019
    5
    6
    20/08/2019
    7
    30/08/2019
    I know you know but I forgot my Crystal Ball and don't know what you know



    In the first post, show the type of machine (PC / Mac) and the Office version you are working on
    impossible things we do on the spot. for miracles you need to wait for a while

Some videos you may like

User Tag List

Tags for this Thread

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

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