+ Reply to Thread
Results 1 to 9 of 9

A formula to calculate how many days until a specific date

  1. #1
    Forum Contributor
    Join Date
    05-02-2017
    Location
    NoVa, United States
    MS-Off Ver
    Microsoft 365
    Posts
    154

    A formula to calculate how many days until a specific date

    Okay so I'm thinking I'm not thinking about this properly. I have a spreadsheet with two tabs. On Sheet2 I want a formula that figures out how many days are left (cell A4), subtracting the closest date on Sheet1 (column A) from today. So today is 4/10/2023. The closest date on Sheet1 is 4/17/2023. That would be 7 days. Now, if it were 4/18/2023, then the closest would be 5/1/2023, but the days would be 21.

    Any ideas? I feel like I'm missing something simple.
    Attached Files Attached Files

  2. #2
    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,463

    Re: A formula to calculate how many days until a specific date

    Try
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    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


  3. #3
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.84 (24041420))
    Posts
    8,751

    Re: A formula to calculate how many days until a specific date

    why 21
    18/4 to 1/5 is 13 days

    anyway try
    =INDEX(Sheet1!A2:A36,1+MATCH(Sheet2!A2,Sheet1!A2:A36,1))-A2
    Attached Files Attached Files
    Wayne
    if my assistance has helped, and only if you wish to , there is an "* Add Reputation" on the left hand side - you can add to my reputation here

    If you have a solution to your thread - Please mark your thread solved do the following: >
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

  4. #4
    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,463

    Re: A formula to calculate how many days until a specific date

    Or, if you have LET, then a bit neater,
    Formula: copy to clipboard
    Please Login or Register  to view this content.

  5. #5
    Forum Contributor
    Join Date
    05-02-2017
    Location
    NoVa, United States
    MS-Off Ver
    Microsoft 365
    Posts
    154

    Re: A formula to calculate how many days until a specific date

    Okay so I'm going with TMS's second formula - I had no awareness of LET formulas and I appreciate learning totally new stuff.

    etaf - maybe the difference is in formatting?

    I'm referring to the number of days between April 10th and May 1st, which is 21.

  6. #6
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.84 (24041420))
    Posts
    8,751

    Re: A formula to calculate how many days until a specific date

    OK, but you did say if the day was the 18th not the 10th
    confused
    TMS has the same result - 13

  7. #7
    Forum Contributor
    Join Date
    05-02-2017
    Location
    NoVa, United States
    MS-Off Ver
    Microsoft 365
    Posts
    154

    Re: A formula to calculate how many days until a specific date

    Lol, my mistake - I'm so sorry, I was extrapolating and then didn't follow through. It didn't even occur to me when I responded to you that I'd changed it to the 18th.

    All three formulas work.

  8. #8
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.84 (24041420))
    Posts
    8,751

    Re: A formula to calculate how many days until a specific date

    you are welcome

  9. #9
    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,463

    Re: A formula to calculate how many days until a specific date

    You're welcome. Thanks for the rep.

+ 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. Replies: 7
    Last Post: 02-02-2017, 02:41 PM
  2. [SOLVED] I need a formula to always calculate exactly 21 days from today's date.
    By phxfitness in forum Excel General
    Replies: 7
    Last Post: 06-26-2015, 07:00 PM
  3. [SOLVED] Formula to calculate days and hours remaining in SPECIFIC months.
    By jmewebb in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 07-07-2014, 10:17 AM
  4. Calculate End Date Using Start Date and No. of Days excluding specific days.
    By SinusxCosinusx in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-22-2013, 05:48 AM
  5. Formula to calculate days till a given date + more
    By DmitriK in forum Excel General
    Replies: 7
    Last Post: 11-21-2008, 09:04 PM
  6. [SOLVED] formula to calculate future date from date in cell plus days
    By Chicesq in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 11-03-2005, 08:30 AM
  7. Formula for calculate date after adding 90 days to it
    By aman2100 in forum Excel General
    Replies: 3
    Last Post: 03-14-2005, 09:33 AM

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