如果该值不存在,如何获取 Excel 中的下一个最近的单元格?

How to get the next nearest cell in Excel if the value does not exist?

我必须对日期范围内的值求和。但是,如果第一个日期不存在,则 Excel 从前一个日期求和。

帮助我了解如何获取值的下一个单元格地址。

你所面对的正是LOOKUP function的定义。 "If the LOOKUP function can't find the lookup_value, the function matches the largest value in lookup_vector that is less than or equal to lookup_value."

但为什么 LOOKUP 呢?您可能想要的可以使用 SUMIFS function:

轻松实现

D4中的公式:

=SUMIFS(B:B,A:A,">="&$D,A:A,"<="&$D)