问题描述:

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))
相关阅读:
Top