+ Reply to Thread
Results 1 to 3 of 3

Get hours from a cell - count hours

  1. #1
    Registered User
    Join Date
    10-21-2010
    Location
    Portugal
    MS-Off Ver
    Office 365 & Google Sheets
    Posts
    23

    Get hours from a cell - count hours

    Hello all,

    I tried to find a solution for a case I'm facing, where basically I want to extract/split + count the hours of a certain cell.

    As examples I have on cells:

    - A1: 08:00
    - A2: 06:00
    - A3: 01:00
    - A4: 02:00
    - A5: 00:00

    I always need 2 things to split the first hour, from the remaining hours and to count the total times I have 1 hours blocks.

    The formulas on Bx, Cx, Dx and Ex should return these:

    - B1: 01:00 / C1: 07:00 | D1: 1 / E1: 7
    - B2: 01:00 / C2: 05:00 | D2: 1 / E2: 5
    - B3: 01:00 / C3: 00:00 | D3: 1 / E3: 0
    - B4: 01:00 / C4: 01:00 | D4: 1 / E4: 1
    - B5: 00:00 / C5: 00:00 | D5: 0 / E5: 0

    I already tried several formulas, but can't get one that really does what I need.

    Could any of the excel masters of the forum, kindly share some possible solutions?

    Very much appreciated, in advance.

  2. #2
    Forum Contributor
    Join Date
    05-18-2021
    Location
    London, Ontario
    MS-Off Ver
    365
    Posts
    115

    Re: Get hours from a cell - count hours

    have you tried doing "=HOUR(A1)" then formatting that cell as general

  3. #3
    Forum Expert KOKOSEK's Avatar
    Join Date
    08-03-2018
    Location
    Pole in Yorkshire, UK
    MS-Off Ver
    365/2013
    Posts
    2,765

    Re: Get hours from a cell - count hours

    a
    b
    c
    d
    e
    1
    08:00
    01:00
    07:00
    1
    7
    2
    06:00
    01:00
    05:00
    1
    5
    3
    01:00
    01:00
    00:00
    1
    0
    4
    02:00
    01:00
    01:00
    1
    1
    5
    00:00
    00:00
    00:00
    0
    0



    a
    b
    c
    d
    e
    1
    08:00
    =if(a1>0,timevalue("01:00:00"),0)
    =a1-b1
    =b1*24
    =c1*24
    Happy with my answer * Add Reputation.
    If You are happy with solution, please use Thread tools and mark thread as SOLVED.

+ 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. Replies: 3
    Last Post: 05-25-2020, 11:49 AM
  2. Replies: 5
    Last Post: 09-12-2019, 04:16 AM
  3. Replies: 3
    Last Post: 07-24-2018, 03:24 AM
  4. Count total of staff hours excluding hours for any leavers
    By FraserMc97 in forum Excel General
    Replies: 1
    Last Post: 04-05-2017, 11:44 AM
  5. Seperate simple hours, holiday hours and night hours
    By enitron in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 06-27-2014, 07:22 AM
  6. [SOLVED] Calculate hours with predefined Working Hours and Weekend Hours
    By garciapliz in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 08-05-2013, 11:17 AM
  7. Replies: 6
    Last Post: 03-25-2010, 07:50 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