+ Reply to Thread
Results 1 to 3 of 3

Calculate minutes for each hour within time range

  1. #1
    Registered User
    Join Date
    02-11-2011
    Location
    Vilnius, Lithuania
    MS-Off Ver
    Excel 2016
    Posts
    83

    Calculate minutes for each hour within time range

    Hello friends,

    suppose you have a time range from 2020-01-01 17:05 to 2020-01-01 19:25 .

    How to calculate the number of minutes for each hour.

    We have:

    55 min for 17th hour (from 17 to 18)
    60 min for 18th hour (from 18 to 19)
    25 min for 19th hour (from 19 to 20)
    0 min for 20th hour (from 20 to 21)

    Probably there will be 24 columns created for each hour, but I can't figure out a formula.

    To make this harder, what if time range is spanning between few days..

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,938

    Re: Calculate minutes for each hour within time range

    What you need to understand about dates and times in excel is…

    a date is just a number representing the number of days passed since 1/1/900...and then formatted in a way that we recognize as a date. So, for instance, today (Mon 03 Aug 2020) is actually 44046

    Time is actually a decimal part of 1 (day), so 06:00 AM is 0.25, 12 noon is 0.5 and 18:00 (or 6 PM) is 0.75

    Having said that, you would be looking for times between ...
    O
    P
    31
    17:05
    0.711806
    32
    18:00
    0.75
    33
    19:00
    0.791667
    34
    19:25
    0.809028
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,938

    Re: Calculate minutes for each hour within time range

    Adding days to this just means you would need to add 1 where necessary to the appropriate decimals

+ 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] Time-Calculation-HOUR and Minutes
    By majidsiddique in forum Excel General
    Replies: 4
    Last Post: 01-11-2020, 05:32 AM
  2. [SOLVED] Calculate minutes from an hour
    By ba13 in forum Excel General
    Replies: 4
    Last Post: 04-13-2017, 05:28 PM
  3. Replies: 4
    Last Post: 01-07-2014, 08:03 AM
  4. Calculate total clocked In minutes in a given hour
    By rizmomin in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 07-07-2013, 08:09 PM
  5. Calculate required number of staff based on 45 minutes calls taken per hour
    By david1987 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 07-03-2013, 06:13 AM
  6. [SOLVED] Calculate Fractional minutes between half hour intervals with multiple start and end times
    By CheeksExcelForum in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 05-20-2013, 02:19 PM
  7. [SOLVED] Calculate hour and minutes worked each day
    By Allan in forum Excel - New Users/Basics
    Replies: 3
    Last Post: 11-19-2005, 06:35 PM

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