muhleebbin
Active Member
- Joined
- Sep 30, 2017
- Messages
- 252
- Office Version
- 365
- 2019
- 2016
- 2013
- 2010
- Platform
- Windows
- MacOS
- Mobile
- Web
Is there a way to create the following formula to expand or contract to the next instance of a SUMIF above it either through a macro or some other various mean?
=IF(F18>40,F18-SUMIF(E11:E17,"*PTO*",F11:F17)-40,0)
The formula is used to find any overtime for an employee, taking out any Paid Time Off hours so that we accurately pay our employees. There's over 25 employees and the number of rows (E11:E17 and F11:F17) can vary employee by employee and even week over week depending on how many jobs the employee is working on.
If this formula is used as is, you can imagine how tedious it would be to expand/contract columns E & F to each employees new data set each week.
Columns are:
Date, Job, Time In, Time out, Cost Code, Hours, Earn Code, Phase
If there's another better way to calculate the Overtime hours accurately I wouldn't mind scrapping this original idea as well.
=IF(F18>40,F18-SUMIF(E11:E17,"*PTO*",F11:F17)-40,0)
The formula is used to find any overtime for an employee, taking out any Paid Time Off hours so that we accurately pay our employees. There's over 25 employees and the number of rows (E11:E17 and F11:F17) can vary employee by employee and even week over week depending on how many jobs the employee is working on.
If this formula is used as is, you can imagine how tedious it would be to expand/contract columns E & F to each employees new data set each week.
Columns are:
Date, Job, Time In, Time out, Cost Code, Hours, Earn Code, Phase
If there's another better way to calculate the Overtime hours accurately I wouldn't mind scrapping this original idea as well.