如何在线查找下一个可用日期

问题描述 投票:1回答:1

我有这个演示表

https://docs.google.com/spreadsheets/d/1iexvfvQVHUc8BooAxpDg8awf6CDpv80b6Z_etBNPc0M/edit?usp=sharing

我需要的是arrayformula是从Col“C”和Col“D”日期内联下一个可用日期,并根据它应用颜色

此外,想要在已经过去的日期中拥有“过去”

我在Col F中有我的预期结果,因为我很难解释我需要什么

请帮忙。

google-sheets google-sheets-formula
1个回答
0
投票
=ARRAYFORMULA(QUERY({IFERROR(QUERY(IF(LEN(C2:C), 
 IF((C2:C<TODAY())*(D2:D<TODAY()), "Past",
 IF((C2:C<TODAY())*(D2:D>TODAY()), "On Going now", )), ),
 "where Col1='Past' or Col1='On Going now'"),"");
 QUERY(IF(LEN(C2:C), 
 IF((C2:C>TODAY())*(D2:D>TODAY()), "Next Available", ), ),
 "where Col1='Next Available' limit 1")},
 "where Col1 is not null"))

0

© www.soinside.com 2019 - 2024. All rights reserved.