+ Reply to Thread
Results 1 to 10 of 10

How to use MATCH to get results within varying timestamp periods

  1. #1
    Forum Contributor
    Join Date
    12-03-2008
    Location
    Key West, FL
    MS-Off Ver
    365 Apps for Enterprise
    Posts
    665

    How to use MATCH to get results within varying timestamp periods

    I've attached a workbook which has three worksheets.

    Worksheet "A" column A has a series of timestamps which are spaced 30 minutes apart.

    DATA 1 worksheet has timestamps spaced 1 hour apart, along with corresponding data.

    DATA 2 worksheet has timestamps spaced 1 day apart along with corresponding data.

    I need some kind of MATCH formula which obtains the data from the two data worksheets which is >= and < the timestamps in column A of Worksheet A.

    The workbook has some example results and notes which I hope will help.

    Thanks!
    Attached Files Attached Files
    Last edited by jrtaylor; 11-10-2018 at 07:10 PM.

  2. #2
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,746

    Re: How to use MATCH to get results within varying timestamp periods

    Try this in B2 of sheet A:

    =SUMIFS('DATA 1'!E:E,'DATA 1'!$A:$A,">="&A2,'DATA 1'!A:A,"<"&A2+1/24)

    and this in C2:

    =IFERROR(INDEX('DATA 2'!E:E,MATCH(INT(A2),'DATA 2'!A:A,0)),"")

    Copy down as required.

    Hope this helps.

    Pete

    EDIT: To suppress the zeros that you get in column B, apply this Custom Format to B2 before copying it down:

    General;-General;

    (the semicolons are important)

  3. #3
    Forum Contributor
    Join Date
    12-03-2008
    Location
    Key West, FL
    MS-Off Ver
    365 Apps for Enterprise
    Posts
    665

    Re: How to use MATCH to get results within varying timestamp periods

    Thanks Pete. Looks like its working. I should have included additional information on my datasets, but didn't because I was assuming a "one formula fits all" solution.

    The additional information: There will be a Data 3 dataset with weekly periods, and a Data 4 with monthly periods. Would either of the formulas in your suggestion work for those longer periods? Or would I need new formulas? (the additional info would be in columns D and E of sheet A.)

    I appreciate your help on this.

  4. #4
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,746

    Re: How to use MATCH to get results within varying timestamp periods

    Attach another workbook with the extra data in there. I'll take a look at it tomorrow, as it's getting a bit late here.

    Pete

  5. #5
    Forum Contributor
    Join Date
    12-03-2008
    Location
    Key West, FL
    MS-Off Ver
    365 Apps for Enterprise
    Posts
    665

    Re: How to use MATCH to get results within varying timestamp periods

    OK thanks I will work on it and repost the workbook.
    Last edited by jrtaylor; 11-12-2018 at 12:36 PM.

  6. #6
    Forum Contributor
    Join Date
    12-03-2008
    Location
    Key West, FL
    MS-Off Ver
    365 Apps for Enterprise
    Posts
    665

    Re: How to use MATCH to get results within varying timestamp periods

    Revised workbook posted. Thanks!
    Attached Files Attached Files

  7. #7
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,746

    Re: How to use MATCH to get results within varying timestamp periods

    I'm away for a few days and don't have Excel on this tablet, so I won't be able to look at this till the weekend.

    Pete

  8. #8
    Forum Contributor
    Join Date
    12-03-2008
    Location
    Key West, FL
    MS-Off Ver
    365 Apps for Enterprise
    Posts
    665

    Re: How to use MATCH to get results within varying timestamp periods

    Hi Pete I figured it out. For the 1 week to 1 month timeframes I used this structure (just adding x number of days to the "<" operator):

    Please Login or Register  to view this content.
    Look OK to you?

  9. #9
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,746

    Re: How to use MATCH to get results within varying timestamp periods

    Yes, that looks fine. Glad you got it to work on your own.

    If that takes care of your original question, please take a moment to select Thread Tools from the menu above and to the right of your first post in this thread, and mark this thread as SOLVED.

    Pete

  10. #10
    Forum Contributor
    Join Date
    12-03-2008
    Location
    Key West, FL
    MS-Off Ver
    365 Apps for Enterprise
    Posts
    665

    Re: How to use MATCH to get results within varying timestamp periods

    Thanks again Pete.

+ 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. Charting occurrences over varying time periods
    By bex1210 in forum Excel Charting & Pivots
    Replies: 3
    Last Post: 03-05-2018, 10:25 PM
  2. [SOLVED] Summing results returned from vlookups where some cells in array contain periods
    By ridd3ll in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 10-14-2016, 10:12 AM
  3. [SOLVED] Total units made by week number with varying manufacturing periods
    By BRISBANEBOB in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 05-09-2016, 06:49 PM
  4. Multiple IF, vlookup conditions and varying results
    By dh1231 in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 01-30-2014, 12:14 PM
  5. Change timestamp based on results of vlookup?
    By infopro247 in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-20-2012, 08:50 AM
  6. Replies: 3
    Last Post: 07-10-2012, 12:09 PM
  7. IRR with varying hold periods
    By kmorque in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 06-02-2009, 03:04 AM

Tags for this Thread

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