+ Reply to Thread
Results 1 to 8 of 8

Need Formula for Timesheet

  1. #1
    Registered User
    Join Date
    02-29-2024
    Location
    USA
    MS-Off Ver
    MS 365
    Posts
    4

    Need Formula for Timesheet

    Hi all hope you're doing well.

    I would like to create a weekly staff schedule/shift coverage. Please take a look at the attachment.

    I need a formula in every cell that can tell me whether the agent is supposed to be on shift or not. In the sheet I have attempted to highlight the agent who is on shift to green and red when they're offline, but it doesn't go according to the specific which I'm quite lost on how I should extend the formula. The idea of the file is to import the data in the dump sheet and the schedule will come up automatically.

    Thank you in advance!
    Attached Files Attached Files

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,869

    Re: Need Formula for Timesheet

    Welcome to the forum.

    Please clarify in what way your current formula is failing.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Registered User
    Join Date
    02-29-2024
    Location
    USA
    MS-Off Ver
    MS 365
    Posts
    4

    Re: Need Formula for Timesheet

    Thank you!

    Lets say for cell 11 for example and this is the formula:

    =IF(C$9>=VLOOKUP($A11,Dump!$A:$D,3,0),(C$9<=VLOOKUP($A11,Dump!$A:$D,4,0)))

    It works for the first table (26/02/2024) but not the second table even if I aligned the cell value accordingly

    =IF(C$41>=VLOOKUP($A43,Dump!$A:$D,3,0),(C$41<=VLOOKUP($A43,Dump!$A:$D,4,0)))

    I'm guessing this is due to the lack of referencing to the agents and dates in each of the tables, and I'm at a loss at how to sneak another condition into the formula.

  4. #4
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,869

    Re: Need Formula for Timesheet

    Explain in WORDS what the formulae need to do EXACTLY.
    Last edited by AliGW; 02-29-2024 at 06:06 AM. Reason: Error corrected.

  5. #5
    Registered User
    Join Date
    02-29-2024
    Location
    USA
    MS-Off Ver
    MS 365
    Posts
    4

    Re: Need Formula for Timesheet

    I'm trying to create a timesheet that will auto-populate the values of True and False in each of the time slots in 2.26 - 3.3.2024 tab, which will ultimately tell me if an agent is supposed to be on shift or not based on the date and time of day.

    C11 for example returns as False because agent 1 shift is 9:00 - 17:30 based on the Dump tab.

    The 26/02/2024 table works because it is based on the first values from the dump, but not for the second one. After all, the formula does not have criteria for specific dates i.e. row B in Dump and I'm hoping to correct it as I would like to include more tables in the tab.

  6. #6
    Registered User
    Join Date
    02-29-2024
    Location
    USA
    MS-Off Ver
    MS 365
    Posts
    4

    Re: Need Formula for Timesheet

    Reattaching since the first one isn't working
    Attached Files Attached Files

  7. #7
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,869

    Re: Need Formula for Timesheet

    Try this in C11:

    =LET(d,FILTER(Dump!$A$2:$D$5000,(Dump!$B$2:$B$5000=$A$1)*(Dump!$A$2:$A$5000=$A11)),AND(C$9>=VLOOKUP($A11,d,3,0),$C$9<=VLOOKUP($A11,d,4,0)))

    and this in C43:

    =LET(d,FILTER(Dump!$A$2:$D$5000,(Dump!$B$2:$B$5000=$A$33)*(Dump!$A$2:$A$5000=$A43)),AND(C$41>=VLOOKUP($A11,d,3,0),$C$41<=VLOOKUP($A11,d,4,0)))

    Set the red rule to act on FALSE and the green rule to act on TRUE.

    Untested - you will need to do that bit.

  8. #8
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,587

    Re: Need Formula for Timesheet

    Formula for CF for Green and Red are , in C11:
    For Green
    Formula: copy to clipboard
    Please Login or Register  to view this content.

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

    I have deleted the other formula for RED. in case required pl add it.
    Attached Files Attached Files
    Pl note
    Array formula should be confirmed with Ctrl+Shift+Enter keys together.
    If answere is satisfactory press * to add reputation.

+ 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. Formula in Timesheet
    By AaruJaan in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 02-11-2016, 06:33 AM
  2. Timesheet formula
    By sforeman in forum Excel General
    Replies: 3
    Last Post: 04-23-2010, 02:24 PM
  3. Excel 2007 : Timesheet Formula
    By Igmaruckfed in forum Excel General
    Replies: 3
    Last Post: 06-07-2009, 03:05 PM
  4. timesheet formula
    By shazeela in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 02-04-2008, 02:20 PM
  5. Timesheet Formula
    By Paul Morgan in forum Excel General
    Replies: 8
    Last Post: 08-15-2007, 08:32 PM
  6. formula to use on a timesheet
    By jayebe in forum Excel General
    Replies: 2
    Last Post: 06-06-2007, 05:24 PM
  7. Help with a timesheet formula
    By cballard2217 in forum Excel General
    Replies: 3
    Last Post: 12-20-2006, 05:44 AM

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