Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/sharepoint/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
根据8小时在excel中添加小时数_Excel - Fatal编程技术网

根据8小时在excel中添加小时数

根据8小时在excel中添加小时数,excel,Excel,在我的excel中,项目状态仅以小时为单位 这意味着 M1 4 hrs M2 6 hrs M3 10 hrs M4 3 hrs 我必须创建一个excel,这样如果我给出一个开始日期,所有类似的日期都需要根据8小时的工作时间来计算 例如,如果我的开始日期为2010年1月9日(这是我输入的日期)(mm/dd/yyyy) 请任何人给我一个建议 谢谢, Aswini Mahesh。您必须知道,xl中的日期和时间是以1900年1月1日(或任何固定的参考日期)起的天为单位存储的。这允许简单的加法/减法。

在我的excel中,项目状态仅以小时为单位

这意味着

M1 4 hrs
M2 6 hrs
M3 10 hrs
M4 3 hrs
我必须创建一个excel,这样如果我给出一个开始日期,所有类似的日期都需要根据8小时的工作时间来计算

例如,如果我的开始日期为2010年1月9日(这是我输入的日期)(mm/dd/yyyy)

请任何人给我一个建议

谢谢,
Aswini Mahesh。

您必须知道,xl中的日期和时间是以1900年1月1日(或任何固定的参考日期)起的天为单位存储的。这允许简单的加法/减法。
从中可以扣除1天的值为1,因此1小时的值为1/24。
要测试这一点,请在单元格中输入任何日期或时间,然后清除单元格格式。
一旦你得到这个,你就可以解决任何问题。

示例: A、B、C

开始日期结束日期总小时数

2010年9月15日1:32 2010年9月16日1:32 24:00

2010年9月15日1:32 2010年9月15日13:32 12:00

2010年9月15日1:32 2010年9月15日7:32 06:00

2010年9月15日1:32 2010年9月15日8:44 07:12

C单元的公式为:=b2-a2+IF(a2>b2,1)

结束日期-开始日期+如果(开始日期>结束日期,1)

由于某种原因,我不能附上这张照片

                  Start Date               End Date
M1                 09/01/2010               09/01/2010  (4 hrs)
M2                 09/01/2010               09/02/2010  (6 hrs so talking 2 hrs from 09/02/2010)
M3                 09/02/2010               09/03/2010  (6 hrs from 9/2/2010 and 4 hrs from 9/3/2010)
M4                 09/03/2010               09/03/2010  (3 hrs from 9/3/2010)