到期日逢周六,持有天数加2天,逢周日持有天数加1天的EXCEL函数要怎么设置?

2024-12-17 06:29:46
推荐回答(2个)
回答1:

公式:
=B1-A1+IF(WEEKDAY(B1)=7,1,IF(WEEKDAY(B1)=1,2,0))

回答2:

=IF(WEEKDAY(B1)=7,B1-A1+2,IF(WEEKDAY(B1)=1,B1-A1+1,B1-A1))