+ Reply to Thread
Results 1 to 3 of 3

Excel 2007 : Question regarding a formula

  1. #1
    Registered User
    Join Date
    05-26-2011
    Location
    london
    MS-Off Ver
    Excel 2003
    Posts
    2

    Question regarding a formula

    Hi,
    I have a formula that displays the number of months between two dates
    =DATEDIF(D4,A1,"m")
    It works fine, however data will be added over time and in cells that have no date inputted the formula assumes the date to be 01/01/1900 and gives a ridiculous number. To prevent confusion in others who be using this sheet. How can ensure that no result is displayed until a date has been inputted.

    Thanks in advance


    a b c d e

    1 Surname Forname D.O.B Date of Discharge 12 / 24 Months
    2 Boyle John 01/01/1980 01/07/2010 11
    3 Boyle Ted 05/10/1984 31/12/200 9 17
    4

  2. #2
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675

    Re: Question regarding a formula

    Try like this

    =IF(D4="","",DATEDIF(D4,A$1,"m"))
    Audere est facere

  3. #3
    Registered User
    Join Date
    05-26-2011
    Location
    london
    MS-Off Ver
    Excel 2003
    Posts
    2

    Re: Question regarding a formula

    Excellent, thank you so much :-)

+ 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