当前位置: 动力学知识库 > 问答 > 编程问答 >

if statement - Excel Help - Trying to use IF and WORKDAY functions

问题描述:

I am trying to count the number of days between two different dates. I would like to know the number of WORKDAYS (excluding weekends) between column H and I. But, IF column H is blank I need it to calculate the number of WORKDAYS between the dates in G and I. Result to display in column J.

网友答案:

The function NetWorkdays counts the work days between dates and also takes into account a list of public holidays that you can have somewhere in the workbook.

syntax: =NetWorkdays(startDate,endDate,[holidays])

Wrap in an IF statement for different scenarios.

=if(H2="",networkdays(G2,I2),networkdays(H2,I2))
分享给朋友:
您可能感兴趣的文章:
随机阅读: