+ Reply to Thread
Results 1 to 8 of 8

Formula for time within start/end time and after end time

  1. #1
    Registered User
    Join Date
    02-12-2020
    Location
    BatonRouge
    MS-Off Ver
    2016
    Posts
    4

    Formula for time within start/end time and after end time

    Hi,

    I'm using this formula =IF(AND(E2>C3,E2<D3),"Yes","No")

    to show when a certain time falls within a start and end time. However, I also need it to display Yes when the time is after E2. Can anyone help with this? Thanks


    Date Time In Date Time Out Travel Time End
    07/11/2019 09:03 07/11/2019 22:03 07/12/2019 02:03 Yes
    07/11/2019 17:50 07/12/2019 06:15 07/12/2019 10:15 Yes
    07/12/2019 09:00 07/12/2019 13:30 07/12/2019 17:30 No

  2. #2
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,666

    Re: Formula for time within start/end time and after end time

    (How to) Upload a Workbook directly to the Forum
    (please do not post pictures or links to worksheets)
    • Click Advanced next to "Post Quick Reply" button at the bottom right of the editor box.
    • Scroll down until you see "Manage Attachments",
    • Click the "Choose" button at the upper left (upload from your computer).
    • Select your file, click "open", click "upload"
    • Once the upload is completed the file name will appear below the input boxes in this window.
    • Close the Attachment Manager window.
    • Click "Submit Reply"
    Note: Please do not attach password protected workbooks/worksheets
    Ensure to disable any Workbook Open/Autorun macros before attaching!
    Ben Van Johnson

  3. #3
    Registered User
    Join Date
    02-12-2020
    Location
    BatonRouge
    MS-Off Ver
    2016
    Posts
    4

    Re: Formula for time within start/end time and after end time

    Thank you!
    Attached Files Attached Files

  4. #4
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2405
    Posts
    13,427

    Re: Formula for time within start/end time and after end time

    Hello cfe4130. Welcome to the forum.

    How about
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    These all return "Yes".
    Dave

  5. #5
    Registered User
    Join Date
    02-12-2020
    Location
    BatonRouge
    MS-Off Ver
    2016
    Posts
    4

    Re: Formula for time within start/end time and after end time

    Thanks, but I need to also show Yes if the travel end time falls between time in and out or if it falls after the time end. It can say No if it falls before the Time In

  6. #6
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2405
    Posts
    13,427

    Re: Formula for time within start/end time and after end time

    Which is what my formula does. Please see the amended times in the attached (high lighted yellow) and the formula also applied.

  7. #7
    Registered User
    Join Date
    02-12-2020
    Location
    BatonRouge
    MS-Off Ver
    2016
    Posts
    4

    Re: Formula for time within start/end time and after end time

    I can't figure out why F4 yields Yes, because the travel time end is before the start time of C5. With the old formula, it would yield No which is what I want it to say.
    Last edited by cfe4130; 02-24-2020 at 10:37 AM.

  8. #8
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2405
    Posts
    13,427

    Re: Formula for time within start/end time and after end time

    My bad! Apologies. Formula wasn't pointing to the correct row. Please try this instead.
    Formula: copy to clipboard
    Please Login or Register  to view this content.

+ 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: 04-25-2020, 03:23 AM
  2. Replies: 0
    Last Post: 03-04-2016, 06:38 PM
  3. Replies: 10
    Last Post: 11-08-2014, 04:51 PM
  4. Replies: 3
    Last Post: 12-19-2013, 06:49 AM
  5. Automatic generation of Start time, end time and total time in excel
    By dreamwarden in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-21-2013, 08:03 PM
  6. Replies: 3
    Last Post: 03-27-2012, 01:07 PM
  7. display end time automatically upon entering start time and time usage
    By stoey in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 12-19-2008, 06:16 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