+ Reply to Thread
Results 1 to 5 of 5

Calculating Each Hour Worked by Multiple Employees to get the total Cost of Each Hour

  1. #1
    Registered User
    Join Date
    02-23-2015
    Location
    Dallas, Texas
    MS-Off Ver
    2016
    Posts
    3

    Calculating Each Hour Worked by Multiple Employees to get the total Cost of Each Hour

    Hello all,

    I currently have multiple instances of tables set up to accomplish this, but the base table headers that I currently have:

    Employee ID - Entered
    Hourly Pay Rate - Entered (but on another table, so really it is a reference)
    Day (Sun - Sat, not date specific. Like a schedule)
    Start Time
    End Time
    Total Hours worked

    What I am trying to do:
    Perfect world, I would (either on the existing table, or a separate table) display how many employees were working at any given hour. This is a 24 hour operation, so there are employees who will work, for example, from Monday into Tuesday. Even more scary Sat into Sun. I am thinking an if to return 1s or 0s from which I can either calculate their hourly rate for that hour or not.

    What has worked so far:
    I have been able to get the following formula to work with someone who works all of their hours on the same day:

    This simply does not work for someone who would work Sat 17:00 to Sun 03:30, for example, but does work for someone who works Sun 03:30 to Sun 17:00. It was here that I realized my solution is shortsighted because it does not account for offsets. I am really hitting a wall on this and am completely open to any solutions to get this working. I do not care where or how these calculations are achieved. The absolute references are also not required, but I was trying to drag this formula across nearly two hundred columns.

    This caused me to think that I will need to go much bigger than I originally thought and account for each hour of each day on each row. I am fine with this solution, but still cannot conceive how to properly get the offset from what would become the reset day (Sun = Day 1, Sat = Day 7, where do the calculations for Day 7 into Day 1 go?)

    Final Hope:
    My headcanon is that this data will eventually go into a pivot table where each hour of the day, for each day of the week, will be able to be displayed with both the costs for each hour, or the employee count for each category. Any tips, ideas, and special bonus points for formula or vba solutions is so GREATLY appreciated.

    Solution:
    So I was close to this, but also apparently miles off. Essentially I just need to add two columns to essentially act as foreign keys (c time in & out) to the reference table that I was utilizing to populate the huge column names for each hour of each day. Before I was attempting to do this within the formula. I'd bet it was something to do with syntax, but am not positive.

    Final formula:
    <<Not allowing me to post it>>

    Additionally, I had to think outside of the box on the days. My only concern was the cost of each employee per day based upon their hours worked. Once I realized the scope fully, I simply added an additional day for the overflow:

    Day 1 = Sun
    Day 2 = Mon
    Day 3 = Tue
    ...
    Day 8 = Sun 2

    Aggregation was done in another table.
    Last edited by cs25001; 12-06-2019 at 04:46 PM. Reason: attachment

  2. #2
    Forum Expert PaulM100's Avatar
    Join Date
    10-09-2017
    Location
    UK
    MS-Off Ver
    Office 365
    Posts
    2,108

    Re: Calculating Each Hour Worked by Multiple Employees to get the total Cost of Each Hour

    Check the yellow banner above.
    Click the * to say thanks.

  3. #3
    Registered User
    Join Date
    02-23-2015
    Location
    Dallas, Texas
    MS-Off Ver
    2016
    Posts
    3

    Re: Calculating Each Hour Worked by Multiple Employees to get the total Cost of Each Hour

    Post fixed as best as possible. Thank you for the notice!

  4. #4
    Forum Expert PaulM100's Avatar
    Join Date
    10-09-2017
    Location
    UK
    MS-Off Ver
    Office 365
    Posts
    2,108

    Re: Calculating Each Hour Worked by Multiple Employees to get the total Cost of Each Hour

    By banner I was saying to upload a sample file. Follow the instructions and upload it, there is no need for links.

  5. #5
    Registered User
    Join Date
    02-23-2015
    Location
    Dallas, Texas
    MS-Off Ver
    2016
    Posts
    3

    Re: Calculating Each Hour Worked by Multiple Employees to get the total Cost of Each Hour

    Thank you. It's been done.

+ 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. Help in subtracting given hour from total hours worked
    By gelaherrera9 in forum Excel General
    Replies: 3
    Last Post: 06-14-2019, 11:05 PM
  2. Replies: 5
    Last Post: 09-13-2017, 02:08 PM
  3. Replies: 2
    Last Post: 12-24-2015, 03:00 PM
  4. Replies: 2
    Last Post: 06-20-2015, 11:49 AM
  5. Calculate employees working from hour to hour
    By otter in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 12-03-2014, 08:57 AM
  6. Multiply hours:minutes by cost/hour to get total cost?
    By Rachael in forum Excel General
    Replies: 4
    Last Post: 05-03-2006, 11:15 AM
  7. Calculating time worked using 100ths of an hour, from 1 day into n
    By maintchief in forum Excel - New Users/Basics
    Replies: 4
    Last Post: 10-27-2005, 07: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