首页 > 解决方案 > How to Use formula to insert Month to Date Automatically

问题描述

I want to use a single formula in cell A2 to insert Month to date Automatically. (in descending order). Only show date within this month (September)

For example, Today is 9/2/2021. It will show: 9/2/2021 9/1/2021

Let's say we entering the next day 9/3/2021. It will show: 9/3/2021 9/2/2021 9/1/2021

https://docs.google.com/spreadsheets/d/1Rq7_yGZjXEqN84BIKmmZ0a8qlcPF2ZIgvdCD2aorGKc/edit?usp=sharing Thank you so much for your help.

标签: google-sheetsgoogle-sheets-formulaspreadsheet

解决方案


A2根据以下日期尝试此操作B1

=arrayformula(sort((eomonth(B1,-1))+(sequence(B1-eomonth(B1,-1),1)),1,0))

或者这个使用today()

=arrayformula(sort((eomonth(today(),-1))+(sequence(today()-eomonth(today(),-1),1)),1,0))

推荐阅读