+ Reply to Thread
Results 1 to 4 of 4

Calculate total hours

  1. #1
    Registered User
    Join Date
    09-12-2018
    Location
    Colmar, Pennsylvania
    MS-Off Ver
    2017
    Posts
    12

    Calculate total hours

    Hi, I am trying to calculate the total hours used in a machine (Data below) however, I want to only count data that is within 15 minutes of each other. For instance if the machine was used at 15:17:52. and then again at 15:45:00. those 25 mins and some shouldn't count towards my total hours.
    Any help is appreciated it.



    2018-01-02 15:17:52.0000000
    2018-01-02 15:17:53.0000000
    2018-01-02 15:18:49.0000000
    2018-01-02 15:19:00.0000000
    2018-01-02 15:19:10.0000000
    2018-01-02 15:21:32.0000000
    2018-01-02 15:39:44.0000000
    2018-01-02 15:43:11.0000000
    2018-01-02 15:43:22.0000000
    2018-01-02 15:50:31.0000000
    2018-01-02 15:50:41.0000000
    2018-01-02 15:50:53.0000000
    2018-01-02 15:54:02.0000000
    2018-01-02 15:55:19.0000000
    2018-01-02 15:59:56.0000000
    2018-01-02 16:00:05.0000000
    2018-01-02 16:00:14.0000000
    2018-01-02 16:05:04.0000000
    2018-01-02 16:05:18.0000000
    2018-01-02 16:05:19.0000000
    2018-01-03 07:58:58.0000000
    2018-01-03 07:58:59.0000000
    2018-01-03 07:59:08.0000000
    2018-01-03 07:59:16.0000000
    2018-01-03 08:00:07.0000000
    2018-01-03 08:17:25.0000000
    2018-01-03 08:17:50.0000000
    2018-01-03 08:21:04.0000000
    2018-01-03 08:21:05.0000000
    2018-01-03 08:21:13.0000000
    2018-01-03 08:45:26.0000000
    2018-01-03 08:45:52.0000000
    2018-01-03 08:46:36.0000000
    2018-01-03 09:01:56.0000000
    2018-01-03 09:41:51.0000000
    2018-01-03 09:42:03.0000000
    2018-01-03 09:42:04.0000000
    2018-01-03 09:42:17.0000000

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

    Re: Calculate total hours

    Based on your example data set, what result would you want?

    You could try this formula, array-entered using Ctrl-Shift-Enter, with your data in A1:A38 - note the one row offset of the ranges used.

    =SUM(IF(A2:A38 - A1:A37 < TIME(0,15,0),A2:A38 - A1:A37))
    Bernie Deitrick
    Excel MVP 2000-2010

  3. #3
    Registered User
    Join Date
    09-12-2018
    Location
    Colmar, Pennsylvania
    MS-Off Ver
    2017
    Posts
    12

    Re: Calculate total hours

    I am not sure if that works. It just spits out a number but can't figure out how to relate that number back to time.

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

    Re: Calculate total hours

    Format the cell with the formula for time: [h]:mm:ss would be best, depending on the length of time you expect.

+ 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. [SOLVED] Formula to calculate hours worked w/lunch or w/o + OT column only total after 40 hours
    By blinhart in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 10-31-2023, 11:14 AM
  2. [SOLVED] Calculate total hours
    By sirdon in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 02-26-2018, 04:13 PM
  3. [SOLVED] Calculate Total Hours
    By Billy Spivy in forum Excel General
    Replies: 4
    Last Post: 02-02-2018, 11:57 AM
  4. [SOLVED] Calculate Total Hours each occurrence and Total Days for all occurences
    By CARD17 in forum Excel Formulas & Functions
    Replies: 47
    Last Post: 01-18-2017, 11:02 PM
  5. Calculate Total Hours
    By sabubakaralis in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 04-02-2015, 09:15 PM
  6. Replies: 14
    Last Post: 10-08-2014, 11:31 PM
  7. [SOLVED] How do I calculate total hours by rate of pay?
    By FrankF in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 02:05 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