简体   繁体   English

如何按周薪计算Excel中的加班费?

[英]how to calculate overtime in excel using by weekly pay?

+-----------+-----------+------+
|    Day    | Reg.Hours |  OT  |
+-----------+-----------+------+
| Monday    | 8         | 0.75 |
| Tuesday   | 8         | 0.5  |
| Wednesday | 8         | 1    |
| Thursday  | 8         | 0    |
| Friday    | 8         | 2.25 |
| Saturday  | 0         | 0    |
| Sunday    | 0         | 0    |
| Monday    | 8         | 0    |
| Tuesday   | 5.5       | 0    |
| Wednesday | 8         | 3.25 |
| Thursday  | 8         | 2.75 |
| Friday    | 8         | 0.5  |
| Saturday  | 0         | 0    |
| Sunday    | 0         | 0    |
+-----------+-----------+------+

Rules are: 规则是:

Monday to Sunday, at least, work 40 Reg.Hours to get any overtime for that week. 至少周一至周日需要工作40个小时,才能获得该周的加班时间。

In the above data set for the 2nd week Monday to Sunday for Reg.Hours total is 37.5 that means, the company will deduct 2.5 OT hours from the 2nd week of Monday to Sunday OT hours. 在上述从星期一到星期日的第二个星期的数据集中,小时总数为37.5,这意味着该公司将从星期一的第二个星期到星期天的OT时间中扣除2.5个小时的时间。

How do I calculate in Excel with a formula for calculating both weeks OT in 1 excel formula? 如何在Excel中使用一个公式来计算1个Excel公式中的两个星期的工作时间?

Let's say per hour pay is $30.00 假设每小时工资是$ 30.00

You could do this with an Array Formula, but as you only have the days of the week, not the actual dates (which are unique) in your table, I think this will be easier with a helper column. 您可以使用数组公式来执行此操作,但是由于表中只有星期几,而不是实际日期(唯一的日期),因此我认为使用helper列会更容易。

Assuming the first 3 columns are A, B, and CI would add a helper column in column D, starting with D2 and copied down as follows: 假设前三列是A,B和CI,则将在D列中添加一个辅助列,该列从D2开始并向下复制,如下所示:

=IF(A2="Sunday",MAX(0,SUM(OFFSET(B2,-6,0,7,2))-40),"")

What this does is: Once a week (on Sunday, at the end of the week), Excel will sum up the previous 7 days of data, including column B & C. This is the total number of hours worked. 它的作用是:每周一次(在星期日,在周末结束时),Excel将汇总前7天的数据,包括B和C列。这是总工作小时数。 That amount, minus 40 [limited to 0, if < 40 hours are worked], represents the total number of OT hours worked that week. 该数量减去40(如果工作少于40小时,则为0),表示该周工作的OT时间总数。

The fact that you have a regular hours column and an OT column is a bit of a red herring - instead of checking whether any OT was worked on any day, and then subtracting by the number of regular hours NOT worked on other days, just compare the whole week's work to 40 and end the calculation there. 您有一个固定的小时数列和一个OT列这一事实有点像鲱鱼-不用检查任何一天是否有任何OT工作,然后减去其他天不工作的正常小时数,只需比较整个星期的工作量达到40,并在那里结束计算。

I think the easiest way would be to use a iamge to demonstrate the answer 我认为最简单的方法是使用iamge演示答案

数字视图

公式视图

Assuming Day is Column A, Row 1, Regular is Column B, Row 1, and OT is Column C, Row 1: 假设Day是A列第1行,Regular是B列第1行,OT是C列第1行:

First, Calculate total regular and OT hours for each week in the pay period: 首先,计算支付期内每周的常规时间和加班时间:

                                        Col. A   Col. B        Col. C
On Row 17, Calculate Regular/OT Hours:  Week 1   =SUM(B2:B8)   =SUM(B9:C15)
On Row 18, Calculate Regular/OT Hours:  Week 2   =SUM(C2:C8)   =SUM(C9:C15)

On Row 19, Calculate: 在第19行,计算:

  Regular Hours   =IF(B17+C17>=40,40,B17+C17)+IF(B18+C18>=40,40,B18+C18)
  OT Hours        =IF(B17+C17>=40,B17-40+C17,0)+IF(B18+C18>=40,B18-40+C18,0)

Hope this helps. 希望这可以帮助。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Excel中如何在没有循环引用的情况下动态计算剩余的加班时间和使用的加班时间? - How to dynamically calculate the overtime left and the overtime used without a circular reference in Excel? 用excel写一个复杂的公式来计算加班时间 - Writing a complex formula in excel to calculate overtime hours 我如何根据某个数字在Excel中计算每周平均值 - How can I calculate a weekly average in Excel from a certain figure Excel 公式在尝试计算加班时间或更少时间时不起作用 - Excel formula not working while trying to calculate overtime or lesser time 计算内加班时间计算并省略常规时间excel - calculate overtime within a time calculation and omit the regular time excel excel:4 种不同的工作工资等级,每个值的运行记录包括从“基本工时”到加班的交换 - excel: 4 different pay scales at work w/ running tally of each value including swap from "base hours" to Overtime 根据每周日期计算平均值EXCEL - Calculate average of based on weekly dates EXCEL 在Excel 2010中计算双周支付期 - Calculate the Biweekly Pay-period in Excel 2010 使用Excel计算每周平均值 - Computing weekly averages using Excel 每个接收者使用Excel每周发送多少次 - How many weekly deliveries per receiver using excel
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM