嗨所以我有预订日期的表,只有2列...国家和预订每个国家只能在一天预订。周一至周五,第二栏显示“日”。有没有一个计算可以根据今天说下一个插槽是什么:(根据表中的日期),但如果今天是星期一,插槽是星期一,它将显示下周一的日期等....
所以基本上今天(星期三)我需要一个计算,将检查下一个可用的预订,并显示日期:所以,如果下一个星期四在文件中我需要它显示14/03/2019如果在文件是星期三我会需要它显示下周,因为今天是晚到20/03/2019
如果有人在寻找同样的东西......我已经有了它...也许不是最美丽的解决方案但是有效...
=如果[v Next Dry] =“Monday”和DayName(CurrentDate())=“Monday”那么RelativeDate(CurrentDate(); 7)ElseIf [v Next Dry] =“Monday”和DayName(CurrentDate())=“星期二“然后RelativeDate(CurrentDate(); 6)ElseIf [v Next Dry] =”Monday“和DayName(CurrentDate())=”Wednesday“然后RelativeDate(CurrentDate(); 5)ElseIf [v Next Dry] =”Monday“ “和DayName(CurrentDate())=”Thursday“然后RelativeDate(CurrentDate(); 4)ElseIf [v Next Dry] =”Monday“和DayName(CurrentDate())=”Friday“然后RelativeDate(CurrentDate(); 3 )ElseIf [v Next Dry] =“Monday”和DayName(CurrentDate())=“Saturday”然后RelativeDate(CurrentDate(); 2)ElseIf [v Next Dry] =“Monday”和DayName(CurrentDate())=“星期天“然后RelativeDate(CurrentDate(); 1)
ElseIf [v Next Dry] =“Tuesday”和DayName(CurrentDate())=“Monday”然后RelativeDate(CurrentDate(); 1)ElseIf [v Next Dry] =“Tuesday”和DayName(CurrentDate())=“Tuesday” “然后RelativeDate(CurrentDate(); 7)ElseIf [v Next Dry] =”Tuesday“和DayName(CurrentDate())=”Wednesday“然后RelativeDate(CurrentDate(); 6)ElseIf [v Next Dry] =”Tuesday“和DayName(CurrentDate())=“Thursday”然后RelativeDate(CurrentDate(); 5)ElseIf [v Next Dry] =“Tuesday”和DayName(CurrentDate())=“Friday”然后RelativeDate(CurrentDate(); 4) ElseIf [v Next Dry] =“Tuesday”和DayName(CurrentDate())=“Saturday”然后RelativeDate(CurrentDate(); 3)ElseIf [v Next Dry] =“Tuesday”和DayName(CurrentDate())=“Sunday” “然后RelativeDate(CurrentDate(); 2)
ElseIf [v Next Dry] =“Wednesday”和DayName(CurrentDate())=“Monday”然后RelativeDate(CurrentDate(); 2)ElseIf [v Next Dry] =“Wednesday”和DayName(CurrentDate())=“Tuesday” “然后RelativeDate(CurrentDate(); 1)ElseIf [v Next Dry] =”Wednesday“和DayName(CurrentDate())=”Wednesday“然后RelativeDate(CurrentDate(); 7)ElseIf [v Next Dry] =”Wednesday“和DayName(CurrentDate())=“Thursday”然后RelativeDate(CurrentDate(); 6)ElseIf [v Next Dry] =“Wednesday”和DayName(CurrentDate())=“Friday”然后RelativeDate(CurrentDate(); 5) ElseIf [v Next Dry] =“Wednesday”和DayName(CurrentDate())=“Saturday”然后RelativeDate(CurrentDate(); 4)ElseIf [v Next Dry] =“Wednesday”和DayName(CurrentDate())=“Sunday” “然后RelativeDate(CurrentDate(); 3)
ElseIf [v Next Dry] =“Thursday”和DayName(CurrentDate())=“Monday”然后RelativeDate(CurrentDate(); 3)ElseIf [v Next Dry] =“Thursday”和DayName(CurrentDate())=“Tuesday” “然后RelativeDate(CurrentDate(); 2)ElseIf [v Next Dry] =”Thursday“和DayName(CurrentDate())=”Wednesday“然后RelativeDate(CurrentDate(); 1)ElseIf [v Next Dry] =”Thursday“和DayName(CurrentDate())=“Thursday”然后RelativeDate(CurrentDate(); 7)ElseIf [v Next Dry] =“Thursday”和DayName(CurrentDate())=“Friday”然后RelativeDate(CurrentDate(); 6) ElseIf [v Next Dry] =“Thursday”和DayName(CurrentDate())=“Saturday”Then RelativeDate(CurrentDate(); 5)ElseIf [v Next Dry] =“Thursday”和DayName(CurrentDate())=“Sunday” “然后RelativeDate(CurrentDate(); 4)
ElseIf [v Next Dry] =“Friday”和DayName(CurrentDate())=“Monday”然后RelativeDate(CurrentDate(); 4)ElseIf [v Next Dry] =“Friday”和DayName(CurrentDate())=“Tuesday” “然后RelativeDate(CurrentDate(); 3)ElseIf [v Next Dry] =”Friday“和DayName(CurrentDate())=”Wednesday“然后RelativeDate(CurrentDate(); 2)ElseIf [v Next Dry] =”Friday“和DayName(CurrentDate())=“Thursday”然后RelativeDate(CurrentDate(); 1)ElseIf [v Next Dry] =“Friday”和DayName(CurrentDate())=“Friday”然后RelativeDate(CurrentDate(); 7) ElseIf [v Next Dry] =“Friday”和DayName(CurrentDate())=“Saturday”然后RelativeDate(CurrentDate(); 6)ElseIf [v Next Dry] =“Friday”和DayName(CurrentDate())=“Sunday” “然后RelativeDate(CurrentDate(); 5)
ElseIf [v Next Dry] =“Saturday”和DayName(CurrentDate())=“Monday”然后RelativeDate(CurrentDate(); 5)ElseIf [v Next Dry] =“Saturday”和DayName(CurrentDate())=“Tuesday” “然后RelativeDate(CurrentDate(); 4)ElseIf [v Next Dry] =”Saturday“和DayName(CurrentDate())=”Wednesday“然后RelativeDate(CurrentDate(); 3)ElseIf [v Next Dry] =”Saturday“和DayName(CurrentDate())=“Thursday”然后RelativeDate(CurrentDate(); 2)ElseIf [v Next Dry] =“Saturday”和DayName(CurrentDate())=“Friday”然后RelativeDate(CurrentDate(); 1) ElseIf [v Next Dry] =“Saturday”和DayName(CurrentDate())=“Saturday”然后RelativeDate(CurrentDate(); 7)ElseIf [v Next Dry] =“Saturday”和DayName(CurrentDate())=“Sunday” “然后RelativeDate(CurrentDate(); 6)
ElseIf [v Next Dry] =“Sunday”和DayName(CurrentDate())=“Monday”然后RelativeDate(CurrentDate(); 6)ElseIf [v Next Dry] =“Sunday”和DayName(CurrentDate())=“Tuesday” “然后RelativeDate(CurrentDate(); 5)ElseIf [v Next Dry] =”Sunday“和DayName(CurrentDate())=”Wednesday“然后RelativeDate(CurrentDate(); 4)ElseIf [v Next Dry] =”Sunday“和DayName(CurrentDate())=“Thursday”然后RelativeDate(CurrentDate(); 3)ElseIf [v Next Dry] =“Sunday”和DayName(CurrentDate())=“Friday”然后RelativeDate(CurrentDate(); 2) ElseIf [v Next Dry] =“Sunday”和DayName(CurrentDate())=“Saturday”然后RelativeDate(CurrentDate(); 1)ElseIf [v Next Dry] =“Sunday”和DayName(CurrentDate())=“Sunday” “然后RelativeDate(CurrentDate(); 7)