简体   繁体   English

Excel 公式将交货日期和目标日期与空单元格进行比较

[英]Excel formula to compare delivery date and target date with empty cells

Working on a project tracker right now and have hit the migraine jackpot on my last formula.现在正在开发一个项目跟踪器,并在我的最后一个公式中中了偏头痛大奖。 Column F has target date, Column G has delivery date, Cell B1 has the reporting date. F 列有目标日期,G 列有交货日期,单元格 B1 有报告日期。 I am trying to get to a formula that tells me if delivery date is lower than target date, the project is "on target" or if not is "late".我试图找到一个公式,告诉我交付日期是否低于目标日期,项目是否“达到目标”或者如果不是“迟到”。 This is the bit I can manage... for some of my projects (not finished) Column G is empty, I would therefore only consider them "late" if the target date (say was due on the 30/01/2017) is in the past compared to the the reporting date (30/02/2017), the others will be left blank.这是我可以管理的一点......对于我的一些项目(未完成),G 列是空的,因此我只会在目标日期(比如 2017 年 1 月 30 日到期)是在过去与报告日期(2017 年 2 月 30 日)相比,其他将留空。 This is where I got to:这就是我要去的地方:

=IF(AND(G5="",F5<$B$1),"late",IF(G5="","",IF(G5<F5,"on target","late")))

Thank you谢谢

这是否符合您的想法?

=IF(AND(G5<F5,G5<>""),"on target",IF(G5="",IF(F5<$B$1,"late",""),"late"))

I used the base formula in the initial post here and made a modification that worked for me.我在最初的帖子中使用了基本公式,并进行了对我有用的修改。

=IF(AND(ISBLANK(R2),"",R2),OR,IF(R2<M2,"Yes","NO"))

in my data R was received date, M is the target date and this formula was pasted in cell V .在我的数据中R是收到日期, M是目标日期,这个公式被粘贴在单元格V中。 I did received a #name?我确实收到了#name? error when R was left blank R留空时出错

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM