根据生日日期排序 sheet 而不考虑日期的年份

Sort sheet according to birthday date without considering the year of a date

我正在尝试根据生日日期对 sheet 进行排序,最接近的生日应该排在第一行,最后一个排在最后等等,为此它应该只考虑日期和月份而不考虑排序的年份,所有这些都通过使用查询函数进行,因为数据是从另一个 sheet.

查询的

我试过使用以下

=SORT(QUERY('Sheet1'!A2:Q, "SELECT * "),6,FALSE)

但它不起作用,我还尝试通过 google sheets 自定义日期和时间格式化数据以仅显示日期和月份,并且仍然只隐藏年份但用于排序仍然考虑年份,如果我应用过滤器进行排序,它将不起作用,因为它是一个查询函数。有什么建议吗?

Link to sheet

尝试:

=QUERY(SORT(Sheet1!A2:Q27, TEXT(Sheet1!F2:F27, "mmdd")*1, 1), 
 "where Col6 is not null", 0)


更新:

=ARRAYFORMULA(ARRAY_CONSTRAIN({
 QUERY(SORT({Sheet1!A2:Q27, TO_DATE(TEXT(Sheet1!F2:F27, "2222-mm-dd")*1)}, TEXT(Sheet1!F2:F27, "mmdd")*1, 1), 
 "where Col6 is not null and Col18 >= date '"&TEXT(DATE(2222, MONTH(TODAY()), DAY(TODAY())), "e-m-d")&"'", 0);
 QUERY(SORT({Sheet1!A2:Q27, TO_DATE(TEXT(Sheet1!F2:F27, "2222-mm-dd")*1)}, TEXT(Sheet1!F2:F27, "mmdd")*1, 1), 
 "where Col6 is not null and Col18 < date '"&TEXT(DATE(2222, MONTH(TODAY()), DAY(TODAY())), "e-m-d")&"'", 0)}, 9^9, 17))