+ Reply to Thread
Results 1 to 3 of 3

Time interval calculation

  1. #1
    Registered User
    Join Date
    03-26-2013
    Location
    Canada
    MS-Off Ver
    ms365
    Posts
    79

    Time interval calculation

    Hi guys,

    I get a daily spreadsheet of which I calculate time differences and highlight any time that is over 5mins. I do this manually but the entries can be up to 200s sometimes and I am looking to make a macro so I can automate it. I have tried using the record macro function but the entries are of different length and this doesn't seem to work. I have attached a sample file with details. Please help me out if possible, Please and thank you.

    regards,

    SN
    Attached Files Attached Files

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,888

    Re: Time interval calculation

    With Power Query
    Load your table to the PQ Editor and add index columns

    Please Login or Register  to view this content.
    Merge the table onto itself and compare times

    Please Login or Register  to view this content.

    Power Query is a free AddIn for Excel 2010 and 2013, and is built-in functionality from Excel 2016 onwards (where it is referred to as "Get & Transform Data").

    It is a powerful yet simple way of getting, changing and using data from a broad variety of sources, creating steps which may be easily repeated and refreshed. I strongly recommend learning how to use Power Query - it's among the most powerful functionalities of Excel.

    - Follow this link to learn how to install Power Query in Excel 2010 / 2013.

    - Follow this link for an introduction to Power Query functionality.

    - Follow this link for a video which demonstrates how to use Power Query code provided.
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  3. #3
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    15,829

    Re: Time interval calculation

    Would you be allowed to use conditional formatting (https://support.microsoft.com/en-us/...b-f1951ff89d7f ). Select column B and tell it to conditionally format all cells larger than 0.00346666 (the serial number fraction of a day that represents 5 minutes) with a red background.
    Quote Originally Posted by shg
    Mathematics is the native language of the natural world. Just trying to become literate.

+ 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. Late/Tardiness Hours calculation per interval
    By Tanekuma01 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 02-22-2020, 09:47 AM
  2. Calculation of Peak license usage in a given interval
    By yskreddy123 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 10-28-2018, 03:29 AM
  3. Replies: 6
    Last Post: 04-15-2018, 04:39 PM
  4. How to use a number to change interval range in calculation
    By oogoldenchildoo in forum Excel General
    Replies: 4
    Last Post: 03-08-2016, 11:12 PM
  5. Time interval - Electrical demand calculation
    By pcmystery in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 08-18-2015, 02:46 PM
  6. Replies: 1
    Last Post: 04-29-2014, 04:42 AM
  7. Replies: 0
    Last Post: 04-23-2012, 10:06 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