+ Reply to Thread
Results 1 to 3 of 3

Testing for time

  1. #1
    Registered User
    Join Date
    08-27-2003
    Location
    Seattle, Washington
    Posts
    17

    Testing for time

    I want to extract data based on time of occurrence each day. The date and time are in a column in the format 5/12/2007 0:00. How do I test for and extract associated data for say the period between 08:00 and 13:00 hours each day?
    Best regards,
    Lram

  2. #2
    Valued Forum Contributor
    Join Date
    07-17-2005
    Location
    Abergavenny, Wales, UK
    MS-Off Ver
    XL2003, XL2007, XL2010, XL2013, XL2016
    Posts
    608

    Re: Testing for time

    Hi

    To get the time from the cell, assuming date and time are in A1, enter in B1
    =MOD(A1,1)
    To test for time, in C1
    =B1>(8,0,0)
    in D1
    =B1<time(13,0,0)

    Obviously you can combine the 2 to get a overall True or False result
    =AND(B1>time(8,0,0),B1<time(13.0.0))
    --
    Regards
    Roger Govier
    Microsoft Excel MVP

  3. #3
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,169

    Re: Testing for time

    I do an extract of data using Advanced Filters.
    http://www.contextures.com/xladvfilter01.html
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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