+ Reply to Thread
Results 1 to 4 of 4

On/Off status - if a time falls between two times and status hasn't changed, same status

  1. #1
    Registered User
    Join Date
    07-11-2012
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    9

    On/Off status - if a time falls between two times and status hasn't changed, same status

    Ha, I didn't know how to title this one.

    I have a bunch of on/off status data, like this (full timestamp with date is in one column, on/off status in another column):

    8/11/2014 3:44:38 PM On
    8/11/2014 10:01:06 PM Off
    8/12/2014 2:11:49 AM On
    8/12/2014 2:22:42 AM Off

    I have another set of data in 15-minute increments, and I want to correlate the on/off status data to it; for example, for these few 15-minute increments the status data would be:

    8/12/2014 1:45:00 AM Off
    8/12/2014 2:00:00 AM Off
    8/12/2014 2:15:00 AM On
    8/12/2014 2:30:00 AM Off

    Hopefully that demonstrates what I'm after - is there an Excel formulaic way to do this? Thanks!

  2. #2
    Registered User
    Join Date
    06-27-2013
    Location
    Boulder, CO
    MS-Off Ver
    Excel 2007
    Posts
    99

    Re: On/Off status - if a time falls between two times and status hasn't changed, same stat

    =VLOOKUP(E1,A1:B4,2,TRUE)

    The TRUE modifier in this allows it to find the nearest time without going over, kind of like a winning guess in The Price Is Right.

    Hope this helps.

    -Z
    Last edited by Zodeeak; 09-11-2014 at 03:35 PM.

  3. #3
    Registered User
    Join Date
    07-11-2012
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    9

    Re: On/Off status - if a time falls between two times and status hasn't changed, same stat

    That works well enough, thank you!

  4. #4
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: On/Off status - if a time falls between two times and status hasn't changed, same stat

    With the first data in columns A and B and the second data in columns C and D enter this in F1 and copy down:

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    The attached workbook uses your data and the above formula:
    Attached Files Attached Files
    <---------If you like someone's answer, click the star to the left of one of their posts to give them a reputation point for that answer.
    Ron W

+ 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. arrange data to show different billing status and customer status
    By applesandpears in forum Excel Charting & Pivots
    Replies: 0
    Last Post: 11-29-2012, 05:57 PM
  2. Replies: 4
    Last Post: 04-08-2012, 09:43 PM
  3. [SOLVED] When status has changed, move to new tab
    By maddog9486 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-19-2009, 03:14 PM
  4. Replies: 1
    Last Post: 06-01-2006, 01:15 PM
  5. Need a msg box that displays time status or loading status
    By havocdragon in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-02-2005, 01:06 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