range(left($开始日期,4),left($结束日期,4))
======
其他参考
根据起始时间、结束时间扩展年月 https://help.fanruan.com/finereport/doc-view-2291.html
根据选择年月自动扩展当月每一天日期 https://help.fanruan.com/finereport/doc-view-1738.html
文档是纵向,你设置横向扩展就可以