简体   繁体   English

Microsoft Excel 2010:= NETWORKDAYS()

[英]Microsoft Excel 2010: =NETWORKDAYS()

I am having a problem with the =NETWORKDAYS() function. 我遇到了= NETWORKDAYS()函数的问题。

Here is my table: 这是我的表:

        A            B            C
    Start date    End Date      #Days
1   15/05/2012    17/05/2012     

In C1 I have entered the formula =NETWORKDAYS(A1,B1) C1我输入了公式=NETWORKDAYS(A1,B1)

The answer should be 2 , but I'm getting 01/01/1900 . 答案应该是2 ,但我要到01/01/1900

For each date in the table, I have used the date function, eg: =DATE(2012,05,15) 对于表中的每个日期,我使用了日期函数,例如: =DATE(2012,05,15)

Any help will be appreciated. 任何帮助将不胜感激。

thanks 谢谢

You formula =NETWORKDAYS(A1,B1) should give the result 3 . 你的公式=NETWORKDAYS(A1,B1)应该给出结果3

And you are getting result as 01/01/1900 which is saying value is 1 but cell format is set to Date . 你得到的结果是01/01/1900 ,它表示值为1但是cell format设置为Date That's why it is displaying in date format. 这就是它以日期格式显示的原因。 Change cell number format to General. 将单元格编号格式更改为常规。

To fix this right-click on your cell and choose Format Cells or navigate to Format -> Cells. 要解决此问题,请在单元格上单击鼠标右键,然后选择“设置单元格格式”或导航到“格式” From the window that appears click Number and choose 0 as the number of decimals. 从出现的窗口中单击“数字”,然后选择“0”作为小数位数。

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM