+ Reply to Thread
Results 1 to 8 of 8

Any ideas how to calculate timesheet?

  1. #1
    Registered User
    Join Date
    08-14-2015
    Location
    England
    MS-Off Ver
    2007
    Posts
    8

    Any ideas how to calculate timesheet?

    Hi, i have a table with lost of information and have to calculate hours how mush each shift is doing.
    For example RDO - Rest Day Off.
    I need this:
    to know how many each shift on that day is working hors.
    Shifts are: Earlies 06-14, Afters 14-22, nights 22-06.
    Coleagues can be doing overtime or changing hours to such situation: 04to12.
    I need on that day to calculate how many hours each shift is doing. File is big, for a whole year and lots of names
    it would be easier if just i would be using this file, but a problem is that format in each cell is this way:
    04to14
    04to08 and so on.
    for an example i will attach example.
    To explain: if coleague is working: 06to14 - Earlies 8hrs
    if: 04to12: Nights 2hrs, Earlies 6hrs and so on.

    Any ideas?
    Attached Files Attached Files

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,926

    Re: Any ideas how to calculate timesheet?

    Hi, welcome to the forum

    I dont know how much data you have like this, but my suggestion is to change the format into real times. What you have there is text, and you cannot run calcs on text.
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Registered User
    Join Date
    08-14-2015
    Location
    England
    MS-Off Ver
    2007
    Posts
    8

    Re: Any ideas how to calculate timesheet?

    hi, thank you for reply.

    I know that there is text there in work book, and there are few cells with H - Holidays, L - Lieu and so on....
    I can manage this by creating lots of hidden sheets, but then file is becoming... big... nearly 130MB
    simply by creating hidden sheets which ones extracts hours like that: if(isnumber(left(cell,2)*1),left(cell,2)*1,"")
    i have to multiply by 1 then excel understands it as number.
    Problem is becoming when rows: lots of dates and lines: nearly thousand of colleagues
    Trick is that this information is filled my managers, and cells are locked to select just from specific range, otherwise it will be a mes...
    any ideas? visual basic? now looking for such information but do not think it will help a lot

  4. #4
    Valued Forum Contributor
    Join Date
    09-17-2012
    Location
    Johannesburg, South Africa
    MS-Off Ver
    Excel 2007
    Posts
    454

    Re: Any ideas how to calculate timesheet?

    I think this does what you need:
    timesheet_template_cy.xlsx

  5. #5
    Registered User
    Join Date
    08-14-2015
    Location
    England
    MS-Off Ver
    2007
    Posts
    8

    Re: Any ideas how to calculate timesheet?

    Hi cyiangou, thank you for making this file, looks good, but the first line is not calculating correct values:
    it gives just 2 hours instead of 6, because colleague was working 22-04.
    Also is it possible to make formula that it would be just in one cell?
    like new sheet:
    A1: will calculate night hours
    A2: Earlies
    A3: afters
    B1, B2 and B3 would calculate another row?
    I will have to make then another formulas to get some information according those numbers.

  6. #6
    Valued Forum Contributor
    Join Date
    09-17-2012
    Location
    Johannesburg, South Africa
    MS-Off Ver
    Excel 2007
    Posts
    454

    Re: Any ideas how to calculate timesheet?

    but the first line is not calculating correct values: it gives just 2 hours instead of 6, because colleague was working 22-04.
    I need this: to know how many each shift on that day is working hours.
    The two hours means (correctly, according to your requirement), that only 2 hours were spent on night shift on that day. Hours from 00:00 to 04:00 belong to the next day.

    Also is it possible to make formula that it would be just in one cell?
    I deliberately didn't combine everything to make my workings clear, and especially to show how to fit time spans into time bins (ie. dealing with night shift splits across midnight). You now have all the components, so you can re-assemble it as you please.

  7. #7
    Registered User
    Join Date
    08-14-2015
    Location
    England
    MS-Off Ver
    2007
    Posts
    8

    Re: Any ideas how to calculate timesheet?

    OK, thank you for this, i will do my best to figure it out.

    Regards
    Tomas

  8. #8
    Registered User
    Join Date
    08-14-2015
    Location
    England
    MS-Off Ver
    2007
    Posts
    8

    Re: Any ideas how to calculate timesheet?

    ok, have an idea, but need some help
    how to make sumproduct and iferror work together
    is there any chance to sumproduct (if first 2 numbers ar less then 6) in such row?

    i am tryng to figure out like this:
    =SUMPRODUCT((IFERROR(MID(A:A,3,2)="to",0)*1)*(LEFT(A:A,2)*1<6)*(LEFT(A:A,2)*1)) --i am trying to make this formula work.
    SUMPRODUCT((MID(A:A,3,2)="to")*(LEFT(A:A,2)*1<6)*(LEFT(A:A,2)*1)) ---this works till i get blank cell or anythng else that does not have "to", such like: RDO

    21to23
    03to15
    07to12
    02to15
    rdo
    04to12
    04to15
    07to12
    07to14
    H

+ 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. Timesheet Calculations to calculate overtime
    By cikuri in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 07-23-2014, 04:12 PM
  2. Replies: 4
    Last Post: 05-03-2013, 12:45 PM
  3. Calculate number of hours in timesheet
    By DMOfcMgr in forum Excel General
    Replies: 3
    Last Post: 04-26-2011, 07:18 PM
  4. Calculate Add'l Hours on Timesheet per day
    By FMGSCG in forum Excel General
    Replies: 7
    Last Post: 04-29-2010, 01:47 PM
  5. Timesheet to calculate No Hours?
    By Mehhico in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 08-27-2008, 02:59 AM
  6. Timesheet formula calculate
    By esaafielham in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-12-2007, 07:59 AM
  7. [SOLVED] How do I calculate an employee timesheet in Excel?
    By Raven in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 10-03-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