Date subtraction function in excel

Posted on 2012-09-22
Last Modified: 2013-04-25
Hi All
I am trying to develop some metrics on task aging.  I have a creation date for the task and a completion date.  The problems I am having are:
Where the completion date cell is empty (not completed) I get a [#VALUE!] error
Where the completion date cell has a date earlier than the creation date I get a [#NUM!] error.
This is the formula I am using: (Q4 is the creation date and V4 is the completion date)
Which works fine when completion cell is populated and the date is more recent than the creation date (Ok, you will ask why I have a completion date earlier than a creation date, simply data entry errors which I'll fix when flagged hopefully by a minus days value)
One other factor that I am not sure if it is influencing this, is that the data is extracted from an oracle dB as an slk file???
Any help ;-)
Question by:ajegan
    LVL 33

    Accepted Solution

    Try this and format the cell with the formula as General.


    Author Comment

    Thanks Imnorie, this works to reslove the [#NUM!] error but I still get a [#VALUE!] where the V4 cell is blank.
    LVL 33

    Expert Comment

    I can only get the #VALUE! error if I put ="" in either V4 or Q4.

    Are either of the values in V4 or Q4 the results of formulas?

    By the way, which version of Excel are you using?
    LVL 50

    Assisted Solution

    by:barry houdini
    Try this version


    regards, barry

    Author Comment

    Really appreciate the quick responses guys, I'm away from the office now but will be right back at this in the morning (GMT here) and will let you know how I get on...

    No, the values are not the result of formulas

    Version is Excel 2007

    I can work around this by adding additional columns and have the new cell populated with TODAY() if it is blank but I would really like to figure out a single cell formula.

    Will get back with you tomorrow thanks again.....

    Author Closing Comment

    Needed to close the question...  apologioes for the really late closure

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Why You Should Analyze Threat Actor TTPs

    After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

    Convert between Excel file formats (.XLS, .XLSX, .XLSM) with/without macro option David Miller (dlmille) Intro Over this past Fall, I've had the opportunity to see several similar requests and have developed a couple related solutions associate…
    Improved? Move/Copy Add-in Replacement - How to avoid the annoying, “A formula or sheet you want to move or copy contains the name XXX, which already exists on the destination worksheet.” David Miller (dlmille)  It was one of those days… I wa…
    The view will learn how to download and install SIMTOOLS and FORMLIST into Excel, how to use SIMTOOLS to generate a Monte Carlo simulation of 30 sales calls, and how to calculate the conditional probability based on the results of the Monte Carlo …
    This Micro Tutorial will demonstrate how to use a scrolling table in Microsoft Excel using the INDEX function.

    759 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    14 Experts available now in Live!

    Get 1:1 Help Now