+ Reply to Thread
Results 1 to 5 of 5

DATEDIF Assume Today If Blank

  1. #1
    Registered User
    Join Date
    01-11-2019
    Location
    San Jose, CA
    MS-Off Ver
    10
    Posts
    2

    Cool DATEDIF Assume Today If Blank

    Hi Everyone,

    I am hoping someone may be able to help me with a DATEIF formula that I am trying to incorporate a "If Blank, Assume Today" into.

    In the following example, if A2 is blank I would like Excel to assume today's date:

    =DATEDIF(A1,A2,"Y") & "y, " & DATEDIF(A1,A2,"YM") & "m "

    Thanks in advance!

  2. #2
    Forum Contributor
    Join Date
    08-08-2005
    Location
    Kansas, USA
    MS-Off Ver
    2016
    Posts
    293

    Re: DATEDIF Assume Today If Blank

    Try replacing A2 with If(A2=0,Today(),0) inside the formula

  3. #3
    Forum Expert 63falcondude's Avatar
    Join Date
    08-22-2016
    Location
    USA
    MS-Off Ver
    365
    Posts
    6,266

    Re: DATEDIF Assume Today If Blank

    Hello and welcome to the forum.

    Try this:

    =DATEDIF(A1,IF(A2="",TODAY(),A2),"Y") & "y, " & DATEDIF(A1,IF(A2="",TODAY(),A2),"YM") & "m "

  4. #4
    Registered User
    Join Date
    01-11-2019
    Location
    San Jose, CA
    MS-Off Ver
    10
    Posts
    2

    Re: DATEDIF Assume Today If Blank

    You are awesome! That worked perfectly...thank you so much!

  5. #5
    Forum Expert 63falcondude's Avatar
    Join Date
    08-22-2016
    Location
    USA
    MS-Off Ver
    365
    Posts
    6,266

    Re: DATEDIF Assume Today If Blank

    You're welcome. Happy to help.

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Datedif using blank cells
    By Danp123 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 10-31-2017, 09:07 AM
  2. [SOLVED] If, Datedif today() formula
    By Icehockey44 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 11-22-2016, 08:37 AM
  3. not assume blank cell as zero in sumifs function
    By ibnmoosa in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 06-06-2015, 05:02 AM
  4. DATEDIF when second date might be blank
    By aaronfly in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 03-14-2015, 02:34 PM
  5. [SOLVED] Need blank cell instead of #ERROR in DATEDIF formual
    By unley in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 05-18-2013, 04:03 AM
  6. Assume today's date if blank
    By gdi2k in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 10-10-2007, 08:36 AM
  7. Number of days between 2 dates, if end date is blank assume todays
    By JulesM in forum Excel - New Users/Basics
    Replies: 1
    Last Post: 03-01-2006, 08:45 AM

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