+ Reply to Thread
Results 1 to 3 of 3

Create a Time Range off Time Stamps, and Count Intersecting values

  1. #1
    Registered User
    Join Date
    06-12-2013
    Location
    Rochester, Minnesota
    MS-Off Ver
    Excel 2007
    Posts
    80

    Create a Time Range off Time Stamps, and Count Intersecting values

    Hi Folks,

    I have the following data in two workbooks that mimics as follows:

    Workbook A,
    Column A (Time Stamps): Column B (Activity):
    12:00 PM Basketball
    12:30 PM Lunch
    1:00 PM Basketball
    1:30 PM Baseball
    2:30 PM Baseball

    Workbook B
    Column A (Time Stamps):
    12:01 PM
    12:03 PM
    1:05 PM
    1:17 PM

    I am looking for code that will take the time stamp from Workbook B (TSB), and IF TSB is within a time range with Activity switching from Basketball to Baseball (ONLY) then Count 1.

    Any thoughts? All help is greatly appreciated. Thanks!

  2. #2
    Forum Expert
    Join Date
    02-11-2014
    Location
    New York
    MS-Off Ver
    Excel 365 (Windows)
    Posts
    5,945

    Re: Create a Time Range off Time Stamps, and Count Intersecting values

    In Workbook B, Sheet1, cell B2, enter this (adjust the 500 and 501 as needed, but keep the one row relative difference)
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    and copy down to match your times in column A.

    Note that it was ambiguous how to define the "time range with activity switching" so I guessed what you meant.
    Bernie Deitrick
    Excel MVP 2000-2010

  3. #3
    Registered User
    Join Date
    06-12-2013
    Location
    Rochester, Minnesota
    MS-Off Ver
    Excel 2007
    Posts
    80

    Re: Create a Time Range off Time Stamps, and Count Intersecting values

    Thank you very much for your reply.

    First attempt did not 'work' values returned are all "0" even when I manipulated data to induce a "1". Can you elaborate a little more on what this is doing? I was not expecting Sumproduct and am confused to what intent is. Also, I noticed that while we are placing in Workbook B, the entire function points to B except for the greater than less than statements...

+ 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. compare time values - current time with time in cell range?
    By wyattea in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-13-2013, 11:28 PM
  2. [SOLVED] Hour count between date and time stamps, with 2 seperate conidtions
    By barryhammer in forum Excel General
    Replies: 2
    Last Post: 07-13-2012, 09:54 AM
  3. Converting time stamps to time intervals
    By enhydra in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-05-2011, 04:51 PM
  4. Time Difference in hours between two date time stamps
    By Cipher in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 09-17-2010, 10:24 AM
  5. time stamps detailing last save time
    By sam1 in forum Excel General
    Replies: 4
    Last Post: 01-12-2005, 03:21 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