Closed Thread
Results 1 to 2 of 2

To check if a time value falls between two times across midnight

  1. #1
    Registered User
    Join Date
    07-17-2019
    Location
    Sweden
    MS-Off Ver
    Version 1906 MS Excel
    Posts
    34

    To check if a time value falls between two times across midnight

    Hi! I have been using an if function to check if a time value is between two other times. The formula I've been using is =if(and(B4>=C5;B4<=C6);"true";"false") with C5 containing the start value, C6 the end value and B4 the time value that I want to check. So for example, if I want to know if the 00.10 (which is B4 in this case) falls between 23.40 (which is C5 in this case) and 01:00 (C6 in this case), it says false but I want it to say true. Anyone that knows an easy formula to fix this?

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,460

    Re: To check if a time value falls between two times across midnight

    Administrative Note:

    Unfortunately, this is a duplicate thread, and you are allowed only ONE thread per issue here.

    Please see Forum Rule #5 about thread duplication.

    I am closing this thread, but you may continue here in the original thread: https://www.excelforum.com/excel-gen...-midnight.html
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

Closed Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 9
    Last Post: 07-23-2019, 12:38 PM
  2. Replies: 12
    Last Post: 11-11-2018, 08:41 AM
  3. [SOLVED] Want to extract time before and after midnight for a time range that spans midnight
    By schurchill39 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 09-26-2018, 04:18 PM
  4. Replies: 4
    Last Post: 03-02-2016, 02:46 AM
  5. # of times midnight is crossed between date and time ranges
    By thuddleston11 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 09-12-2013, 08:03 AM
  6. Replies: 3
    Last Post: 07-26-2012, 10:50 AM
  7. Replies: 4
    Last Post: 11-28-2010, 08:18 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