+ Reply to Thread
Results 1 to 2 of 2

Formula for defining time spent in specified time periods

  1. #1
    Registered User
    Join Date
    03-19-2019
    Location
    Copenhagen, Denmark
    MS-Off Ver
    Excel for Mac version 16.22
    Posts
    1

    Formula for defining time spent in specified time periods

    Hi all, I'm trying to make a document calculating amount of time spent over a work-day, in different time periods. An example could be an over-all time period from 18.30 to 05.30. Cell A should define time spent between 18.00 and 21.00, Cell B define time spent between 21.00 and 00.00 and Cell C define time spent between 00.00 and 06.00. The result will be Cell A = 2,5 hours, Cell B = 3 hours and Cell C = 5,5 hours. But what formula should I use to get to the results? In advance thanks a lot! Best, Sune.

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

    Re: Formula for defining time spent in specified time periods

    Hello SuneLolk and Welcome to Excel Forum.
    The formula(s) used will depend on the setup. Supposing that 18:30 is in cell D3 and 5:30 is in cell E3 you could:
    For A3:B3 use: =MIN($E3+($D3>$E3),A$2)-MAX($D3,A$1)
    For C3 use: =E3+(D3>E3)-D3-SUM(A3:B3)
    For future reference you will usually get faster if you upload a sample.
    To upload a sample workbook (not a picture or pasted copy) click on the GO ADVANCED button below the Quick Reply window and then scroll down to Manage Attachments to open the upload window.
    Let us know if you have any questions.
    Attached Files Attached Files
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

+ 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. Total time spent over a term where monthly time reduces
    By dave0109 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 03-14-2019, 07:13 AM
  2. [SOLVED] Stop Time Button to capture Time Spent
    By 323100N in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-11-2017, 09:25 AM
  3. Replies: 0
    Last Post: 03-04-2016, 06:38 PM
  4. Calculate time elapsed, excluding time not spent working
    By BREECHEEZ87 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 10-12-2015, 03:01 PM
  5. Replies: 3
    Last Post: 12-19-2013, 06:49 AM
  6. Defining core time periods in a day
    By taito38 in forum Excel General
    Replies: 1
    Last Post: 12-01-2011, 09:17 PM
  7. Time Tracker - I need a macro that calculates the time spent on an activity
    By amark in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-01-2011, 09:55 AM

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