+ Reply to Thread
Results 1 to 3 of 3

Time Category Formular

  1. #1
    Registered User
    Join Date
    11-20-2016
    Location
    Australia
    MS-Off Ver
    2013
    Posts
    2

    Time Category Formular

    Hi All,

    Is is possible to have a formula/VBA that will provide time categories between 2 given DateTimes?

    Eg.

    StartDateTime: 1700, Sun Nov 20th 2016
    FinishDateTime: 0700, Mon Nov 21st 2015

    Time Categories:

    Day Shift (0600-1800 Mon-Fri):1.0
    Night Shift (1800-0600 Mon-Fri):6.0
    Saturday (24hours):0
    Sunday (24hours):7.0
    Public Holiday:0
    Total Hours:14

    If hours fall within Public Holiday I don't need Day shift, Night shift, Saturday or Sunday hours that fall on the public holiday.

    I've been trying myself with basic knowledge of formulas and if statements, but am struggling to find a solution.

    Appreciate any help you could provide.

    Thank you,
    Brandon
    Last edited by brandon_jrose; 11-20-2016 at 01:17 AM.

  2. #2
    Forum Expert
    Join Date
    03-20-2015
    Location
    Primarily UK, sometimes NL
    MS-Off Ver
    Work: Office 365 / Home: Office 2010
    Posts
    2,405

    Re: Time Category Formular

    Welcome to the forum.

    Yes, it's perfectly possible, though the exact formula gets more complicated depending on how many days your shift might span. If the shift will never be more than 24hours, then that's easier than if it might be more than 24hrs.
    I'm just about to go out and won't be able to look at this until at least tomorrow (UK time) but I dealt with a similar problem not long ago. Have a look at sheet AS1 in the attachment in the post linked below and see if that's the sort of thing you'd want. If so, let me know and I can amend it for you (or someone else here might jump in first).
    http://www.excelforum.com/showthread...=1#post4504992
    Regards,
    Aardigspook

    I recently started a new job so am a bit busy and may not reply quickly. Sorry - it's not personal - I will reply eventually.
    If your problem is solved, please go to 'Thread Tools' above your first post and 'Mark this Thread as Solved'.
    If you use commas as your decimal separator (1,23 instead of 1.23) then please replace commas with semi-colons in your formulae.
    You don't need to give me rep if I helped, but a thank-you is nice.

  3. #3
    Registered User
    Join Date
    11-20-2016
    Location
    Australia
    MS-Off Ver
    2013
    Posts
    2

    Re: Time Category Formular

    That's exactly what I'm after!

    I tried to make some changes myself, and found that I could change the values for Saturday so it would be the whole day, but it's not deducting from the ordinary times. Also don't know where to start with Public Holidays, would I need a separate table for public holiday dates?

    Thanks for the help so far.

    Cheers
    Brandon

+ 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. Formular to analize cumulative Time in Attendance sheet
    By oluagbe1 in forum Excel General
    Replies: 4
    Last Post: 06-27-2016, 09:44 AM
  2. Replies: 1
    Last Post: 05-13-2015, 07:17 AM
  3. Complicated formular. Formular, remove text if available
    By TheTrooper1 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 05-02-2014, 12:39 PM
  4. [SOLVED] Formular for time value... help please
    By cdllt in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 10-09-2013, 03:54 AM
  5. [SOLVED] Replacing a date formular result with another formular
    By stpeter in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 08-06-2013, 06:27 PM
  6. Formular for a time line
    By Brento in forum Excel General
    Replies: 3
    Last Post: 02-09-2006, 06:22 PM
  7. what's the formular for time in payroll
    By unique in forum Excel General
    Replies: 1
    Last Post: 07-05-2005, 03:05 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