当日期介于输入之间时计算工作日

Count Business Days when date is between input

我在 excel 2016 年有两张桌子。

第一个标签关联:

 hire_dt      Term_dt         id
 06/25/2018    09/10/2018    101

第二个选项卡输入假设:

   First Date of month (row b4)  last Date of month (row b5)  Business Days (row b7)
      9/1/2018                   09/30/2018                         20

条件:

  1. 学期日期为空且 hire_dt <= "First Date of month" 然后 100

  2. hire_dt >= "First Date of month" 和 "Term_dt" 在 "First Date of month" 和 "last Date of month" 之间然后是 hire_dt 和 hire_dt 之间的工作日term_dt/工作日(b7 行)

  3. hire_dt >= "First Date of month" 并且 term_dt 为空 THEN hire_dt 和“月份的第一个日期/工作日”之间的工作日(行通过)

  4. hire_dt < = "First Date of month" 和 term_dt 在每月的第一个日期和最后一个日期之间,工作日在 "First Date of month" 和 term_dt / 工作日(b7 行)

考虑到您在 post 中没有使用任何问号,要理解您的确切目标并不容易。

但是,我相信,您可以通过组合嵌套 IF() 并将您的条件翻译成 EOMONTH() and WORKDAY() 语言来实现。