+ Reply to Thread
Results 1 to 8 of 8

24 Hour Lookback

  1. #1
    Registered User
    Join Date
    05-28-2014
    Posts
    18

    24 Hour Lookback

    Hi All,

    Looking for a formula to lookback 24 calendar hours and extract the hours and minutes within the start to end periods.

    A B C

    Start End 24 hr lookback
    10/24/13 12:00 10/24/13 13:20 1:20
    10/24/13 18:00 10/24/13 19:10 sum of time within 24 hours of C3 = 2:30 or 2.5
    10/24/13 19:40 10/24/13 20:40 Sum of time within 24 hours of C4 = 3:30 or 3.5
    10/25/13 12:40 10/25/13 13:40 Sum of time within 24 hours of C5 = 4:10 or 4.2

  2. #2
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,053

    Re: 24 Hour Lookback

    Maybe.... in C2

    =(B2-A2)+IF(ISTEXT(C1),0,C1)

    format as time (or as [h]:mm if you will run over 24 hr)
    Attached Files Attached Files
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

  3. #3
    Registered User
    Join Date
    05-28-2014
    Posts
    18

    Re: 24 Hour Lookback

    Hi Glenn,

    Thank you for the quick response.

    The result I was looking for in C5 is 3:10 or 3.2. As Row 2 is beyond the 24 hour look back its duration would not be included. Sorry I probably should have explained better.

    Any suggestions?
    Attached Files Attached Files
    Last edited by teststrip; 11-16-2017 at 01:00 PM. Reason: Attachment

  4. #4
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,567

    Re: 24 Hour Lookback

    The following formula may be pasted into cell C2 and, when dragged down to C5, will yield the same values as those manually placed in D2:D5
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    *Format cells C2:C5 to display [h]:mm as Glen stated.
    Let us know if you have any questions.
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

  5. #5
    Registered User
    Join Date
    05-28-2014
    Posts
    18

    Re: 24 Hour Lookback

    JeteMc and Glenn,

    Strong work! Almost there.

    I revised the spreadsheet with your formula and added notes. The challenge here is to take only the duration that is within 24 hours of corresponding B. Which maybe only a portion of the time from a previous Row.

    Take a look at the attached Book 1 with the notes. I believe its easier explained there.

    Any suggestions?
    Attached Files Attached Files

  6. #6
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,567

    Re: 24 Hour Lookback

    When pasted into D2 and copied down, the following formula yields 7:59 for cell D13:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    I didn't check to see if the other values are what could reasonably be expected, so I encourage closer examination.
    Let us know if you have any questions.

  7. #7
    Registered User
    Join Date
    05-28-2014
    Posts
    18

    Re: 24 Hour Lookback

    JeteMC,

    Fantastic...Absolutely perfect. Problem solved.

    Thank you!

  8. #8
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,567

    Re: 24 Hour Lookback

    You're Welcome and thank you for the feedback. Please take a moment to mark the thread as 'Solved' using the thread tools link above your first post. I hope that you have a blessed day.

+ 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. Lookback and update value
    By bgreeson in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 08-01-2016, 03:04 PM
  2. Replies: 4
    Last Post: 10-02-2015, 10:00 AM
  3. Replies: 0
    Last Post: 03-07-2014, 11:26 AM
  4. 24 hour lookback - flight time tracker for pilots
    By KenBrown in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 08-16-2012, 07:50 AM
  5. Replies: 1
    Last Post: 11-09-2010, 08:02 PM
  6. Replies: 4
    Last Post: 10-14-2010, 03:31 PM
  7. convert decimal numbers to a fraction of an hour for payroll hour
    By Flower in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 02-10-2006, 03:50 PM

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