+ Reply to Thread
Results 1 to 4 of 4

Making a time planning schedule

  1. #1
    Registered User
    Join Date
    07-15-2013
    Location
    Sweden
    MS-Off Ver
    Excel 2010
    Posts
    2

    Making a time planning schedule

    Hello!

    I am currently working on a time planning schedule (not sure if that's the word, english is not my native language) in excel, and think that a macro would be best for the functionality that I need.
    The schedule has a starting time and ending time on each day of the week, which the user enters. What (I guess) the macro should do is do some checks, like calculate the total working-time for the week, and how many hours there are between each shift, and give messageboxes when the times entered does not match the criterias.

    I don't know if I should do all this inside a macro but this is what the schedule needs to do:

    * Give messagebox when a cell-value changes (not sure if this has to be done everytime a value changes, but right now I have this one fixed)
    * Count the time until the next shift (ie [starting time of next shift]-[ending time of this shift])
    * Find the weekly maximum rest between shifts.

    I don't expect somebody to just do the whole macro for me, but any tips or help would be greatly appreciated!

  2. #2
    Forum Contributor
    Join Date
    01-07-2013
    Location
    south africa
    MS-Off Ver
    Excel 2003-13
    Posts
    210

    Re: Making a time planning schedule

    Hello

    Let me try to offer some help, I have tried to break-down your requirements into a few points:

    1. user enters starting times and ending times every day - should be easy. Would they enter them as time (eg. 09:40, 17:20) or as numbers

    2. check 1 - work out total working time for the week. You could enter a formula that subtracts the daily work times and adds them up. If your times are in time format, you could try a conversion like =HOUR(cell)+MINUTE(cell)/60 for each start and end times

    3. check 2 - how many hours between shifts ? Is 1 shift = 1 day ? If not, what is a shift or are there multiple shifts per day, each with its own start and end times ?

    4. check 3 - messagebox for cell value changes ? Which cell value ?

    5. need more information on the shifts, and how they relate to daily work time and start and end times

    Regards
    Most helpful to mark solved items as such (see help for directions). Star ratings are always welcome.

  3. #3
    Registered User
    Join Date
    07-15-2013
    Location
    Sweden
    MS-Off Ver
    Excel 2010
    Posts
    2

    Re: Making a time planning schedule

    Quote Originally Posted by hamjam View Post
    1. user enters starting times and ending times every day - should be easy. Would they enter them as time (eg. 09:40, 17:20) or as numbers

    2. check 1 - work out total working time for the week. You could enter a formula that subtracts the daily work times and adds them up. If your times are in time format, you could try a conversion like =HOUR(cell)+MINUTE(cell)/60 for each start and end times

    3. check 2 - how many hours between shifts ? Is 1 shift = 1 day ? If not, what is a shift or are there multiple shifts per day, each with its own start and end times ?

    4. check 3 - messagebox for cell value changes ? Which cell value ?

    5. need more information on the shifts, and how they relate to daily work time and start and end times
    1. A possibility to enter the time in multiple ways would be good. I havent gotten very clear instructions on this but I would guess as 09:45 and also as 9.75 (i.e minutes as decimals).

    2. If time is entered as 09:45, would the HOUR and MINUTE functions still return the right thing (unsure if this is time format)?

    3. Yes, one shift per day, with it's own starting and ending time.

    4. The cells which holds the starting and ending time, I want the user to get a messagebox when he or she enters a time that doesn't match the criterias of the schedule.

    5. One shift is one day's work, like if you would work 9:00-17:00 on monday, that would be one shift with a length of 8 hours.

    Hope this makes things clearer!

  4. #4
    Forum Contributor
    Join Date
    01-07-2013
    Location
    south africa
    MS-Off Ver
    Excel 2003-13
    Posts
    210

    Re: Making a time planning schedule

    timesheet.xlsm
    Hejsan
    The shift is clear now, I suggest to keep the times in 1 format. That can be enforced through some input validation if necessary

    I still don't know anything about the rules for the message boxes, so I made up a few rules. You can changes these are required - have a look at the spreadsheet.

    In order to pick up the changes in the values, I have inserted the code in the event of the worksheet change. You could re-work it into a user form if you prefer that way.

    Regards

+ 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. Making a Schedule
    By lfsaplcs in forum Excel General
    Replies: 1
    Last Post: 06-13-2013, 01:04 PM
  2. help with making a schedule for work
    By davebusch in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-30-2012, 10:04 PM
  3. making a schedule with auto time format and adding total hours
    By damagedbodies in forum Excel General
    Replies: 0
    Last Post: 04-30-2012, 02:04 PM
  4. Schedule making
    By millera in forum Excel General
    Replies: 3
    Last Post: 07-21-2009, 10:48 PM
  5. Making a schedule, but need to use a sum formula.???
    By twotaileddemon in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 11-04-2007, 11:11 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