+ Reply to Thread
Results 1 to 17 of 17

Retrieving Start and Finish Time for Different Days

  1. #1
    Registered User
    Join Date
    12-16-2014
    Location
    Somerset, England
    MS-Off Ver
    2010
    Posts
    49

    Retrieving Start and Finish Time for Different Days

    Hello All,

    I am having to create a rota system for where I work. This in itself is fine, the important people want a visual view of each team ad their individual shifts. However the also want an overview that they can look at each day with just the start and finish time viewable.

    ie: -
    Names - Start Finish
    Bill - 08:00 11:00
    Dave - 08:00 13:00

    and so on. They then want to be able to select a different day from a drop down list and it provide the same information. I think it can be done using match/index possibly and I have used this for other things in the past but whether it is because it's 16:30 in the afternoon and my brain is fried I don't seem to be able to get my head around it.

    I have included an example and any help or suggestion would be great.
    The shifts are in different colours for a reason, although this won't affect the start/finish time. But I had to find a way of differentiating between them automatically. Again, any better suggestions are welcome.
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    09-11-2014
    Location
    Washington, DC
    MS-Off Ver
    2016
    Posts
    1,907

    Re: Retrieving Start and Finish Time for Different Days

    Example workbook attached.
    Attached Files Attached Files
    Spread the love, add to the Rep

    "None of us are as smart as all of us."

  3. #3
    Forum Expert
    Join Date
    09-01-2012
    Location
    Norway
    MS-Off Ver
    Office 365
    Posts
    2,841

    Re: Retrieving Start and Finish Time for Different Days

    Here is something really cumbersome I put together. I think this kind of problem has been solved multiple times on this forum but I haven't bothered to look on any of them.
    Chances are they are better than this.
    Formula 1:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Formula 2:
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Formula 2 is probably the better one, or at least it will calculate faster.

    Edit: Oh, ####! I guess I should have read the problem properly first.
    Attached Files Attached Files
    Last edited by Jacc; 03-01-2017 at 03:00 PM.
    <----- If you were helped by my posts you can say "Thank you" by clicking the star symbol down to the left

    If the problem is solved, finish of the thread by clicking SOLVED under Thread Tools
    I don't wish to leave you with no answer, yet I sometimes miss posts. If you feel I forgot you, remind me with a PM or just bump the thread.

  4. #4
    Registered User
    Join Date
    12-16-2014
    Location
    Somerset, England
    MS-Off Ver
    2010
    Posts
    49

    Re: Retrieving Start and Finish Time for Different Days

    Thanks to both of you.
    Mcmahobt - I stole a lot of this and was what I needed.
    Jacc - This is awesome, I have stolen some of this.

    Thanks for your help both of you. Apologies for the delay in letting you both know. Was only able to get back to this problem yesterday.

    By "Stolen" I mean utilized.
    Last edited by Suede2; 03-10-2017 at 01:01 PM.

  5. #5
    Registered User
    Join Date
    12-16-2014
    Location
    Somerset, England
    MS-Off Ver
    2010
    Posts
    49

    Re: Retrieving Start and Finish Time for Different Days

    I do have another related question. in the next uploaded example, I need to be able to specify when certain people maybe doing certain tasks within their day.

    Ideally I would like to be able to have it look like the below example. But I'll happily accept any help that anyone could provide.

    eg:-
    Day 1
    Help Phone
    Start Finish Start Finish Start Finish
    Dave 08:00 13:00 08:00 10:00 12:00 13:00

    Mcmahobt kindly sorted the original enquiry and I've used his file as a basis, but I wondered if it was possible to the above with similar formulae.

    Thanks in advance. Although I don't post much, I have used information in other threads a lot.
    Attached Files Attached Files

  6. #6
    Registered User
    Join Date
    12-16-2014
    Location
    Somerset, England
    MS-Off Ver
    2010
    Posts
    49

    Re: Retrieving Start and Finish Time for Different Days

    Previously Mcmahobt was kind enough to supply the formula below.

    =INDEX(INDIRECT("'"&$K$3&"'!$B$1:$G$1"),SMALL(IF(INDIRECT("'"&$K$3&"'!$B2:$G2")<>"",COLUMN(INDIRECT("'"&$K$3&"'!$B2:$G2"))-1),1))

    It enable me to find the earliest start time in a range. It was awesome, it did nearly everything I had asked for. However I now need to adapt it slightly and I don't know how. I now need to find the earliest start time in a range if a certain letter is in the range. I need it to find the earliest time that the letters "H", "M" or "P" are there. for instance someone may start at 8:00, but they are down to go to M at 10:00 and I need to show that on the rota. No one is down to work at more then one of these three letters at any point in the day, so they won't be at H and the M later.

    How do I adapt this formula to show what I am after? There is a download above which is slightly different, it is Mcmahobt's example from above which I have adapted to to show what I need.

    Any help would be greatly received as ever.

  7. #7
    Registered User
    Join Date
    12-16-2014
    Location
    Somerset, England
    MS-Off Ver
    2010
    Posts
    49

    Re: Retrieving Start and Finish Time for Different Days

    Is any one able to tell me if the highlighted speech marks (Bold and underlined in a tasteful purple) below can pick up specific values?

    =INDEX(INDIRECT("'"&$K$3&"'!$B$1:$G$1"),SMALL(IF(INDIRECT("'"&$K$3&"'!$B2:$G2")<>"",COLUMN(INDIRECT("'"&$K$3&"'!$B2:$G2"))-1),1))

    I have tried fiddling but with no luck. Essentially someone was kind enough to give me the formula but I don't know exactly what each part means. I understand the overall idea of what it is doing, but my knowledge is sadly lacking.

    I was wondering if the TEXT or SEARCH Function would be added somewhere maybe? If it does, I still am not sure where it would go.

    Apologies, I'm not intentionally trying to bump up my post. I am trying to figure it out myself, but feel I need a push in the right direction.
    Last edited by Suede2; 03-22-2017 at 11:24 AM. Reason: An apology

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

    Re: Retrieving Start and Finish Time for Different Days

    It is hard to explain how it work, if it works, but at least I hope it works

    Try in attachment.

    Start time is array formula, confirmed by Ctrl-shift-enter
    Attached Files Attached Files
    Quang PT

  9. #9
    Registered User
    Join Date
    12-16-2014
    Location
    Somerset, England
    MS-Off Ver
    2010
    Posts
    49

    Re: Retrieving Start and Finish Time for Different Days

    Thank you so much for replying and helping.

    This is almost perfect, but I need the main Start Time & Finish Time (B Column & C Column) to show the overall time of working.

    eg: on Day 1 Dave working 08:00 until 13:00 not 10:00 to 11:00 as it shows in the example. Then the Start and Finish Time under Help and Phone are perfect the way that they are.

    I/we are so close.

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

    Re: Retrieving Start and Finish Time for Different Days

    OK. Try again:

    Start: array formula
    Please Login or Register  to view this content.
    Finish:
    Please Login or Register  to view this content.

  11. #11
    Registered User
    Join Date
    12-16-2014
    Location
    Somerset, England
    MS-Off Ver
    2010
    Posts
    49

    Re: Retrieving Start and Finish Time for Different Days

    This is exactly what I want. So I've taken the formula over to the main spread sheet and altered the parts that I assume I need to change.

    K3 obviously chooses the day of the week and selects the relevant sheet.
    b1:g1 is the range of times in the working day.

    What is the A2:A1000 part doing?

    I only ask as the supplied formulae don't work in my main sheet and I'd have to edit a lot to upload it without all the information in.

    I am showing a weeks rota at a time, you choose the week you need on the right at the side and it currently pulls the main rota over. it;s the smaller Main and Help reception underneath that don't work. I've tried putting your formula in and it works in the first cell but no others. Any chance you can look at it? I'm sure I'm missing something simple.

    I've done the first few cells under the Main Reception section but without success.
    Attached Files Attached Files
    Last edited by Suede2; 03-22-2017 at 01:34 PM.

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

    Re: Retrieving Start and Finish Time for Different Days

    Try again in attachment. Hope it works.
    Attached Files Attached Files

  13. #13
    Registered User
    Join Date
    12-16-2014
    Location
    Somerset, England
    MS-Off Ver
    2010
    Posts
    49

    Re: Retrieving Start and Finish Time for Different Days

    This is amazing. Thank you ever so much. Seriously I appreciate everything you've done (as well as the others above). if you ever make it to Somerset in England I'll buy you all a drink, but for the moment you'll have to settle for added Reputation.

    One question, with the finishing times column for the receptions is there an ability to choose the next column? So where it states someone finishes at 12:45, ideally they actually finish at 13:00 for when the next person starts. I'm not sure if it can be done, as it may be a limitation of the way I've set the initial week day sheets up.

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

    Re: Retrieving Start and Finish Time for Different Days

    Quote Originally Posted by Suede2 View Post
    One question, with the finishing times column for the receptions is there an ability to choose the next column? So where it states someone finishes at 12:45, ideally they actually finish at 13:00 for when the next person starts. I'm not sure if it can be done, as it may be a limitation of the way I've set the initial week day sheets up.
    I am not sure I could catch your idea fully. Could you show your before and after results and highlight the cells?

  15. #15
    Registered User
    Join Date
    12-16-2014
    Location
    Somerset, England
    MS-Off Ver
    2010
    Posts
    49

    Re: Retrieving Start and Finish Time for Different Days

    Certainly.

    I've created a tab called "What I'd Like". It is a copy of the Overview Tab. If you scroll down and look at the part that you've done for me and compare the two, you'll see that the times are all 15 mins later. Instead of 16:45 finish time it now says 17:00 for example.

    What I meant to ask is where the formula you added finds the time, is it able to choose the next one along?
    Attached Files Attached Files

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

    Re: Retrieving Start and Finish Time for Different Days

    Theorical, to round up to each 30 minute, we use CEILING(A1,1/48) in which 30' = 1/24/2 = 1/48
    Therefore, in each cell, try to put original formular inside the CEILING, like this:
    Cell D45, sheet Overview:
    =CEILING(IFERROR(LOOKUP(2,1/(OFFSET(INDIRECT("'"&C$1&"'!$E$4:$AT$4"),MATCH($A45,INDIRECT("'"&C$1&"'!a5:a1000"),0),)="M"),INDIRECT("'"&C$1&"'!$E$2:$AT$2")),""),1/48)

  17. #17
    Registered User
    Join Date
    12-16-2014
    Location
    Somerset, England
    MS-Off Ver
    2010
    Posts
    49

    Re: Retrieving Start and Finish Time for Different Days

    That works, it does give me an #value error for any empty cells, but I can get around that.

    Again thank you. I shall consider this 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. [SOLVED] Conditionl Formating to highlight time slots between start and Finish time.
    By excelrooky in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 01-25-2017, 02:39 AM
  2. Replies: 12
    Last Post: 01-25-2016, 10:53 AM
  3. Calculate finish time given start time, working hours and job duration
    By swanseaexcel in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-23-2012, 03:00 PM
  4. Replies: 6
    Last Post: 11-29-2011, 09:12 AM
  5. Replies: 8
    Last Post: 03-29-2010, 09:20 PM
  6. Start & Finish Time
    By bosox9 in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 07-24-2006, 05:01 PM
  7. Replies: 1
    Last Post: 03-27-2006, 01:10 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