+ Reply to Thread
Results 1 to 9 of 9

Timesheet formula to deduct unpaid time based on value in a column

  1. #1
    Registered User
    Join Date
    05-23-2014
    Posts
    8

    Timesheet formula to deduct unpaid time based on value in a column

    I have a weekly timesheet that i need to have a cell fill with either 0, .5 or the sum of other cells based on a code.

    I have attached a sample workbook.

    Column D is where the code will be entered. Codes are H for Holiday, V for Vacation, S for Sick. I have formulas in column E to automatically put in 8 hours if those codes are used. Cell E21 should equal 0 in this case.
    If a T or L is found in Column D, it should sum the amounts in column E for those rows which contain the T or L. If no values in column D and E20 is >=6, E21 should be .5, if <6, E21 should be 0.
    This will do part of what I need but I can't make it work for the holiday,vacation and sick codes.

    =IF(E65<6,0,IF(SUMIF(D49:D64,"<>",E49:E64)=0,0.5,SUMIF(D49:D64,"<>",E49:E64)))

    Test Workbook.xlsx
    Last edited by tlstevens; 07-15-2015 at 05:00 PM.

  2. #2
    Valued Forum Contributor
    Join Date
    04-26-2015
    Location
    Toronto, Canada
    MS-Off Ver
    2010
    Posts
    502

    Re: Timesheet formula to deduct unpaid time based on value in a column

    Try using these VLOOKUP cells and work them into your E20 formula, way easier than trying to make an IF, WHAT, AND, OR, WTF!! formula
    Attached Files Attached Files

  3. #3
    Registered User
    Join Date
    05-23-2014
    Posts
    8

    Re: Timesheet formula to deduct unpaid time based on value in a column

    How would the lookup handle multiple instances of the letter. Say they had two different unpaid travel times. Could it sum the multiple instances within the lookup table?
    Last edited by tlstevens; 07-15-2015 at 09:24 PM.

  4. #4
    Valued Forum Contributor
    Join Date
    04-26-2015
    Location
    Toronto, Canada
    MS-Off Ver
    2010
    Posts
    502

    Re: Timesheet formula to deduct unpaid time based on value in a column

    Changed to a SUMIF. This will count any and all instances of t,v,s,and h. Leave it in small caps which is not case sensitive.
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    05-23-2014
    Posts
    8

    Re: Timesheet formula to deduct unpaid time based on value in a column

    My working file contains sheets for each employee. Is there a way to put these lookups on a separate sheet in same workbook and reference for each sheet? Each sheet contains multiple weeks.


    Test Workbook-revised.xlsx

  6. #6
    Valued Forum Contributor
    Join Date
    04-26-2015
    Location
    Toronto, Canada
    MS-Off Ver
    2010
    Posts
    502

    Re: Timesheet formula to deduct unpaid time based on value in a column

    The problem with that scenario is, you would need another sheet with a separate row with 52 columns for each employee to look up each week, then apply 52 separate formulas to refer these lookups back to EACH time sheet.

    (my apologies if you know how to do the following already).

    A better solution would be to build your formulas on sheet 1 completely. i.e. in rows 20 - 23. Using the if formulas in rows 24-27 as and where necessary. Once this is complete select rows 20 - 27, click 'copy. Select the 2nd Employee tab, hold the shift key down and select your last employee tab. All of the sheets will be highlighted. Click 'Paste, this will paste the rows and formulas into every sheet. btw, all of the sheets need to be exactly the same format for this to work, if that is not the case, build sheet 1 completely, select the top left button in between the row #'s and column letters and follow the same copy paste procedure. Each employee will now have exactly the same sheet and formulas. (you would need to change employee names though).

    See attached example.
    Attached Files Attached Files
    Last edited by BlindAlley; 07-16-2015 at 11:46 AM.

  7. #7
    Registered User
    Join Date
    05-23-2014
    Posts
    8

    Re: Timesheet formula to deduct unpaid time based on value in a column

    Thank you for your help. I will play around with it and see what works best.

  8. #8
    Registered User
    Join Date
    05-23-2014
    Posts
    8

    Re: Timesheet formula to deduct unpaid time based on value in a column

    I think I found an easier solution. by adding another row and splitting the unpaid time into two cells subtracted from the total hours. This gives me the time I need to deduct without having to add extra information to the sheet. I adjusted the vacation, sick and holiday up by 30 minutes to account for the automatic deduction of 30 minutes.
    I used the following formulas.

    =IF(E138<6,0,IF(SUMIF(D122:D137,"L",E122:E137)=0,0.5,SUMIF(D122:D137,"L",E122:E137)))
    =IF(E138<6,0,((SUMIF(D122:E137,"T",E122:E137))))

    Thanks for the help.

  9. #9
    Valued Forum Contributor
    Join Date
    04-26-2015
    Location
    Toronto, Canada
    MS-Off Ver
    2010
    Posts
    502

    Re: Timesheet formula to deduct unpaid time based on value in a column

    [QUOTE=tlstevens;4133946]I think I found an easier solution. by adding another row and splitting the unpaid time into two cells subtracted from the total hours. This gives me the time I need to deduct without having to add extra information to the sheet. I adjusted the vacation, sick and holiday up by 30 minutes to account for the automatic deduction of 30 minutes.
    I used the following formulas.

    =IF(E138<6,0,IF(SUMIF(D122:D137,"L",E122:E137)=0,0.5,SUMIF(D122:D137,"L",E122:E137)))
    =IF(E138<6,0,((SUMIF(D122:E137,"T",E122:E137))))


    No problem, I'm happy to see you worked it out.

+ 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] Formula to deduct unpaid breaks in time sheet
    By Rick in forum Excel General
    Replies: 4
    Last Post: 02-22-2016, 12:27 PM
  2. How can I get my formula to deduct lunch breaks based on hours worked?
    By nikijune in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 11-28-2013, 05:10 PM
  3. Time formula to deduct two times
    By salvo69 in forum Excel General
    Replies: 5
    Last Post: 10-30-2012, 10:12 AM
  4. timesheet - deduct value from calculated cell
    By kocco in forum Excel General
    Replies: 14
    Last Post: 04-18-2012, 07:35 AM
  5. double time formula for timesheet
    By techmob in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 09-25-2009, 11:21 AM
  6. [SOLVED] Help, How can I deduct time for a timesheet?
    By Jo in forum Excel General
    Replies: 7
    Last Post: 09-20-2005, 05:05 AM
  7. [SOLVED] Hide Rows based on Time Selection in timesheet.
    By thom hoyle in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 05-02-2005, 06:06 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