+ Reply to Thread
Results 1 to 5 of 5

Formula to get times from range of cells

  1. #1
    Registered User
    Join Date
    11-12-2017
    Location
    Stafford, England
    MS-Off Ver
    365
    Posts
    184

    Formula to get times from range of cells

    Hi, I have attached an example file of the project I am working on. This example focuses only on the first day as data will copy down.

    Working backwards, Sheet 3 shows a legend for inputs in Sheet 1, and also number of hours used/remaining for the week. This is fully automated from Sheet 1 and so far works fine.

    Sheet 2 is the printable finished weekly rota auto-populated from Sheet 1, nothing gets input on this Sheet.

    Sheet 1 is where all the work is done and this is where my problem lies. Its the data on this sheet columns V,W + X that auto-populate sheet 2.

    The current formula I have in column X seems to work fine, displaying the unpaid lunch breaks.

    I am looking for formulas to go in column V & W that will show results as the example looks.

    Currently row 2 is just text, it may be that I need to change this to time but I'm not sure what to do.

    There is also conditional formatting to automatically colour fill the cells.

    Any help appreciated.
    Attached Files Attached Files

  2. #2
    Forum Expert mrice's Avatar
    Join Date
    06-22-2004
    Location
    Surrey, England
    MS-Off Ver
    Excel 2013
    Posts
    4,967

    Re: Formula to get times from range of cells

    As an alternative, you could use (simpler) user defined functions.

    Please Login or Register  to view this content.


    Open the VBA editor by hitting Alt F11.
    Insert a new module with Insert - Module
    Paste in the above function
    Go back to the sheet by hitting Alt F11.

    In a V3, enter =GetStartTime(C3:T3) etc.

    Remember to save the workbook as a macro enabled workbook .xlsm
    Martin

  3. #3
    Registered User
    Join Date
    11-12-2017
    Location
    Stafford, England
    MS-Off Ver
    365
    Posts
    184

    Re: Formula to get times from range of cells

    Thanks for quick reply.

    This solution is much simpler but doesn't work with the times that are quarter to or quarter past the hour?

  4. #4
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,466

    Re: Formula to get times from range of cells

    Try as file attached.
    Attached Files Attached Files
    Quang PT

  5. #5
    Registered User
    Join Date
    11-12-2017
    Location
    Stafford, England
    MS-Off Ver
    365
    Posts
    184

    Re: Formula to get times from range of cells

    Seems to work great, you're a legend.

    On going project so I will look out for you in my next Thread

+ 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] Copy range of cells and paste them X number of times with a jump of 4
    By arbazhamayun in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-07-2018, 11:25 AM
  2. [SOLVED] Copy Range of Cells X Number of Times
    By Justair07 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 11-30-2017, 10:04 AM
  3. [SOLVED] Replacing Cells While Duplicating Range for N times
    By Razzlesama in forum Excel Formulas & Functions
    Replies: 21
    Last Post: 09-22-2017, 04:27 AM
  4. [SOLVED] Counting how many times a range of key words come up in a range of cells
    By Piepongwong in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 09-04-2014, 02:38 PM
  5. Replies: 3
    Last Post: 07-28-2014, 06:08 PM
  6. [SOLVED] Need to automate the copying of range of cells into same row 365 times
    By Hirad001 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 02-07-2014, 01:36 PM
  7. copying 2 cells multiple times to a range
    By NewToVBA_23 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-30-2013, 06:09 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