+ Reply to Thread
Results 1 to 7 of 7

subtracting 2 dates

Hybrid View

  1. #1
    Registered User
    Join Date
    02-22-2013
    Location
    brisbane, australia
    MS-Off Ver
    Excel 2013
    Posts
    91

    subtracting 2 dates

    hi, I know you can subtract 2 dates e.g. cell A1 has 12/3/2015 and cell A2 has 20/3/2015 by using =A2-A1, which gives you 8 days or by using =datedif(A1,A2,"d")....but can you use a cell reference which has a date and subtract an actual date e.g. =A1-01/03/2015 or is this a no no...it's just that I wanted to quickly test some date differences without putting the second date in a cell...

  2. #2
    Forum Guru benishiryo's Avatar
    Join Date
    03-25-2011
    Location
    Singapore
    MS-Off Ver
    Excel 2013
    Posts
    5,147

    Re: subtracting 2 dates

    hi bzl. sure. but you have to use double quotes or a formula:
    =A1-"1mar2015"
    format to general
    OR
    =A1-DATE(2015,3,1)

    i always spell out the month instead of using numbers because different region settings affect the results. d/m/y or m/d/y

    Thanks, if you have clicked on the * and added our rep.

    If you're satisfied with the answer, click Thread Tools above your first post, select "Mark your thread as Solved".

    "Contentment is not the fulfillment of what you want, but the realization of what you already have."


    Tips & Tutorials I Compiled | How to Get Quick & Good Answers

  3. #3
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,774

    Re: subtracting 2 dates

    Formula: copy to clipboard
    =A1-DATEVALUE("01/03/2015")



    Regards, TMS
    Last edited by TMS; 04-14-2015 at 08:40 AM. Reason: dohhh moment
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  4. #4
    Registered User
    Join Date
    02-22-2013
    Location
    brisbane, australia
    MS-Off Ver
    Excel 2013
    Posts
    91

    Re: subtracting 2 dates

    Hi, thank you benishiryo and TMS, they were great options...

  5. #5
    Registered User
    Join Date
    07-10-2014
    Location
    East Sussex, England
    MS-Off Ver
    2007, 2010
    Posts
    51

    Re: subtracting 2 dates

    Or
    =A1-VALUE("12/03/2015")
    but bear in mind when both the day and the month are 12 or less, dependent on your Excel settings this may be interpreted differently for different regions - 12th March or 3rd of December.
    Robbo

  6. #6
    Registered User
    Join Date
    02-22-2013
    Location
    brisbane, australia
    MS-Off Ver
    Excel 2013
    Posts
    91

    Re: subtracting 2 dates

    thanks Rob, will keep that in mind...

  7. #7
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,774

    Re: subtracting 2 dates

    You're welcome.

+ 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. Subtracting Dates
    By arebryn in forum Excel General
    Replies: 2
    Last Post: 06-23-2010, 01:03 PM
  2. Subtracting dates
    By toot033 in forum Excel General
    Replies: 3
    Last Post: 07-17-2006, 04:05 PM
  3. [SOLVED] Subtracting dates?
    By Bill R in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 10:05 AM
  4. Subtracting dates?
    By Bill R in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 03:05 AM
  5. Subtracting dates: 8/31/05-8/1/05?
    By dstock in forum Excel General
    Replies: 1
    Last Post: 07-26-2005, 11:04 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