+ Reply to Thread
Results 1 to 4 of 4

calculates number of days less than or greater than x (a specific date)

  1. #1
    Registered User
    Join Date
    04-07-2013
    Location
    united states
    MS-Off Ver
    Excel 2010
    Posts
    7

    calculates number of days less than or greater than x (a specific date)

    I’m creating a spreadsheet that has a start and end date that overlaps in years. If I enter
    A1 = start date (03/05/2012) and
    A2 = end date (4/25/2013),

    A3 = calculate the number of days in 2012, if applicable (days that is less or before than 12/31/2012) and
    A4 = calculate the number of days that is greater than or after 01/01/2013.

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

    Re: calculates number of days less than or greater than x (a specific date)

    hi t2dela, welcome to the forum. maybe you could share with us what are the desired results. my guess for A3 & A4:
    =DATE(YEAR(A1),12,31)-A1
    =A2-DATE(YEAR(A2),1,1)

    do a +1 if necessary. some people define 26apr13 minus 25apr13 as 2 days or 1 day.

    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
    Registered User
    Join Date
    04-07-2013
    Location
    united states
    MS-Off Ver
    Excel 2010
    Posts
    7

    Re: calculates number of days less than or greater than x (a specific date)

    benishiryo, thank you for responding. That answers part of my question. However, I don't want A3 to calculate anything if the date is after Dec 31, 2012 and i only want A4 to calculate dates after Jan 1, 2013.

  4. #4
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: calculates number of days less than or greater than x (a specific date)

    How about posting several examples and the results you expect.
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

+ 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