excel 嵌套公式 IF 语句协助

excel 嵌套公式 IF 语句协助
=IF([@[Date Last Revised]]>[@[Date of Last Biennial Review]],[@[Date Last Revised]]+730,IF([@[Date of Last Biennial Review]]>[@[Date Last Revised]],[@[Date of Last Biennial Review]]+730),IF([@[Date Last Revised]]=[@[Date of Last Biennial Review]],[@[Biennial Review Date]]))

这是我的函数。在我添加 Last If 语句之前,它一直有效。因为如果上次修订日期和两年期审查日期相同,它只会显示“False”。有人可以帮忙吗?

答案1

通过格式化公式如下:

=IF([@[Date Last Revised]]>[@[Date of Last Biennial Review]],[@[Date Last Revised]]+730,
 IF([@[Date of Last Biennial Review]]>[@[Date Last Revised]],[@[Date of Last Biennial Review]]+730),
IF([@[Date Last Revised]]=[@[Date of Last Biennial Review]],[@[Biennial Review Date]]))

)您可以在第二个 IF 的末尾看到错误。它应该在公式的末尾:

=IF([@[Date Last Revised]]>[@[Date of Last Biennial Review]],[@[Date Last Revised]]+730,
 IF([@[Date of Last Biennial Review]]>[@[Date Last Revised]],[@[Date of Last Biennial Review]]+730,
IF([@[Date Last Revised]]=[@[Date of Last Biennial Review]],[@[Biennial Review Date]])))

但这可以简化,因为您没有在第三个公式中使用 false:

=IF([@[Date Last Revised]]>[@[Date of Last Biennial Review]],[@[Date Last Revised]]+730,
 IF([@[Date of Last Biennial Review]]>[@[Date Last Revised]],[@[Date of Last Biennial Review]]+730,[@[Biennial Review Date]]))

相关内容