+ Reply to Thread
Results 1 to 5 of 5

Varifying whether 2 imes encompass a time band

  1. #1
    Registered User
    Join Date
    09-25-2008
    Location
    UK
    Posts
    3

    Varifying whether 2 imes encompass a time band

    Hi,

    The data I have available is the duty start and duty end time.

    Based on this data alone I want the sheet to return a Yes or No as to whether or not the duty encompasses a specified time band (0200 to 0459).

    So were I to enter a start time of 1300 and end time of 2200 I would expect a No

    Were I to enter a start time of 2100 and an end time of 0345 I would expect a yes

    Were I to enter a start time of 0100 and an end time of 0610 I would expect a yes

    Any help would be very gratefully received!

    Cheers

    Jamie

  2. #2
    Forum Expert
    Join Date
    08-27-2008
    Location
    England
    MS-Off Ver
    2010
    Posts
    2,561
    =if(and('starttime'<=200,'endtime'>=459),"Yes","No")

    HTH

  3. #3
    Registered User
    Join Date
    09-25-2008
    Location
    UK
    Posts
    3
    Firstly thank you very much, I am less than useless with this.

    I have tried the formulae suggested however encountered a couple of issues. Firstly I think an example would make the request clearer;

    If I have Row 9 with all the daily report times and row 10 with all of the daily off duty times (some of which will span past midnight) and in row 23 I want to have the afore mentioned Yes or No for each day.

    How wouyld I go about that?

    Sorry!

    Cheers

    Jamie

  4. #4
    Registered User
    Join Date
    09-25-2008
    Location
    UK
    Posts
    3
    Turns out that;

    =IF(PRODUCT({"02:00","04:59"}-A1)<=0,"Yes",IF(PRODUCT({"02:00","04:59"}-B1)<=0,"Yes","No"))

    Where the duty start is A1 and the off duty is B1

    Does the trick, means nothing to me but a friend passed it on.

    Thanks anyway for the help, very much appreciated.

  5. #5
    Forum Expert
    Join Date
    08-27-2008
    Location
    England
    MS-Off Ver
    2010
    Posts
    2,561
    That's not very pretty...

    Looks like you've been cross-posting but I have no desire to throw accusations around willy-nilly.

    I would recommend finding out how these things work if you ever want to be good at it yourself (and ultimately faster).

+ 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. Changing time
    By Ziggy_ks1 in forum Excel General
    Replies: 1
    Last Post: 04-21-2008, 10:42 PM
  2. Time Ranges
    By jmag in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 03-17-2008, 03:24 PM
  3. Time w/in Each Hour of Day btwn a Time Range
    By gbrogmus in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 12-30-2007, 03:01 AM
  4. Date and Time Graphs
    By sach0025 in forum Excel Charting & Pivots
    Replies: 7
    Last Post: 03-10-2007, 01:07 AM
  5. Assignment overDUE PLEASE PLEASE HELP!!
    By undergrad in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 11-29-2006, 12:34 AM

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