+ Reply to Thread
Results 1 to 3 of 3

#NUM error with date formula

  1. #1
    Registered User
    Join Date
    08-06-2013
    Location
    Syracuse, NY
    MS-Off Ver
    Excel 2010
    Posts
    2

    #NUM error with date formula

    I am counting the days between two dates. The formula I am using in column C is =DATEDIF(A2,B2,"D"). My problem is, column B does not always contain a date. If there is no date in column B, I want a blank cell in column C. Currently, I am getting the error #NUM.

    I have tried =ISERROR(DATEDIF(A2,B2,"D"),"",DATEDIF(A2,B2,"D"), but I am doing something wrong in the formula, as I continue to get a pop-up error box. One pop-up error box says I've entered too many arguements for the function.

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

    Re: #NUM error with date formula

    In Excel 2010 you can use IFERROR like this

    =IFERROR(DATEDIF(A2,B2,"D"),"")

    ....but in fact to get the difference in days between 2 dates you can simply subtract the earlier date from the later one so this formula should also work

    =IF(B2="","",B2-A2)

    format result cell (C2) as general
    Audere est facere

  3. #3
    Banned User!
    Join Date
    10-14-2006
    Posts
    1,211

    Re: #NUM error with date formula

    =IFERROR(Your formula,"")

+ 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. [SOLVED] Formula Error for converting date to quarter and year
    By jayc2111 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 01-15-2013, 01:26 PM
  2. Error in a Formula in getting a date..
    By e4excel in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 12-24-2010, 03:23 PM
  3. Error when using date formula
    By Malvaro in forum Excel General
    Replies: 4
    Last Post: 07-23-2008, 04:13 PM
  4. [SOLVED] Concatenate error and Date Format Error
    By Coal Miner in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-26-2006, 05:35 PM
  5. Date Format Correct, But Formula Error
    By john_mc in forum Excel General
    Replies: 1
    Last Post: 04-09-2006, 11:30 PM

Tags for this Thread

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