+ Reply to Thread
Results 1 to 4 of 4

Ideas on formula for a "days" countdown time that does not round up or down?

  1. #1
    Registered User
    Join Date
    01-28-2018
    Location
    Arkansas
    MS-Off Ver
    MS 2016
    Posts
    10

    Ideas on formula for a "days" countdown time that does not round up or down?

    First of all, I really appreciate any help I receive. I've been searching google and youtube for about a week now and just can not find an answer, so any help would be greatly appreciated for the expertise of the forum.

    Ok, here's what I'm trying to do. I have 3 cells, the first cell I input a date manually (ie 12 Jan 2018), the second I have a (=A1+3) so whatever date I added in the first cell gets 3 days added to it. In the 3rd cell I would like a countdown timer (pointed at the +3 date, or the 2nd cell) against the current date(so If i entered 12 Jan, the 2nd cell would display 15 Jan, and the 3rd cell would return 3 ((given the actual date was 12 Jan, or 2 if the date was 13 Jan)). It would also be helpful, that if I surpassed the date in the "+3 date" cell to continue counting ( ie I entered 12 Jan in the first cell, I get 15 Jan in the 2nd cell, and depending on the current date, I get a number returned on how many days I have remaining until 15 Jan in the 3rd cell...but also, once I pass 15 Jan, continue counting ((should be a negative number starting 16 Jan))).

    example:
    Here's what I have in the 3rd cell =TRUNC(A2-TODAY()) . This seems to work fine in principle, but I have a feeling Excel is trying to round down, bringing me to -1. (the date I entered in this example was 23 Jan, 26 Jan got added in cell 2, yet cell 3 returns -1 when it should be -2, being that the current date is 28 Jan. I was using the "trunc" function to stave off the rounding, but apparently it still wants to round down.

    I have also tried using =DATEDIF(A2,NOW(),"d") , with the same parameters this actually returns a "positive" 2 in cell 3...but since it's the 28th it obviously needs to be a -2. If I try to switch NOW(),A3 Excel gives me an error and doesn't like it.

    I have a feeling I am making this way more confusing that it should be. Basically, I need a countdown function to a certain date, then goes negative if I pass the certain date, and also doesn't round because the rounding is messing me up. Using the "remove decimals" button under "Number" on the top tool bar does nothing (actually it rounds the number up when as I lose decimal places). Please advise.

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS 365 Family 64-bit 2502
    Posts
    27,037

    Re: Ideas on formula for a "days" countdown time that does not round up or down?

    Try looking at post #5 in this thread. I think that is just about the same thing you want. All the discussion about rounding is a bit of a red herring (the function TRUNC applied to a date will round down by definition, that isn't surprising).
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

  3. #3
    Registered User
    Join Date
    01-28-2018
    Location
    Arkansas
    MS-Off Ver
    MS 2016
    Posts
    10
    Quote Originally Posted by 6StringJazzer View Post
    Try looking at post #5 in this thread. I think that is just about the same thing you want. All the discussion about rounding is a bit of a red herring (the function TRUNC applied to a date will round down by definition, that isn't surprising).
    For sure, will do. I have another similar situation going on in my spreadsheet. I have one cell with a date in it, and another cell just counts the days that has passed and displays the number. I had to use the TRUNC function there because of the rounding, but now it's working perfect. Not sure why it's not for the first situation.

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

    Re: Ideas on formula for a "days" countdown time that does not round up or down?

    If A2 is a date with no time then it's sufficient to use just

    =A2-TODAY()

    format result cell as number with no decimal places
    Audere est facere

+ 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: 06-29-2015, 11:44 AM
  2. "IF" formula to have "range of days" returns
    By benjamin_1986 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 05-15-2015, 10:29 AM
  3. Countdown Timer in Excel with a "pause" and "start" button
    By bbhagwat in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-13-2013, 05:49 AM
  4. count days when value change from "0 to +" and "0 to -" using formula
    By amruta_shah15 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-12-2012, 01:17 PM
  5. count days when value change from "0 to +" and "0 to -" using formula
    By amruta_shah15 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-12-2012, 01:13 PM
  6. How do I use the "if" and "round" function in the same formula ?
    By carl in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 04-27-2006, 11:45 AM
  7. [SOLVED] ... round a time entry to the next "30 minute increment"...
    By Dr. Darrell in forum Excel Formulas & Functions
    Replies: 12
    Last Post: 02-03-2006, 12:15 PM

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