Nov 07 2022 12:22 AM
Dear All.
I have a timesheet.
When I entered the number: 1-12 as a month in a year, the table displayed the number of days in this month. But the issue is the days in a month are different so each time I will get the 28days, 30 days, or 31 days. If my table is fixed with rows, for example, 31 rows for the biggest days in a month, when I did the timesheet in Feb, I had to delete 3 days in my table.
I want to display an exact number of days corresponding with the different entered months.
Do I able to do it?
Nov 07 2022 12:45 AM
Solution@Alvin1007 SEQUENCE() function can give you desired result. See the attached file.
=SEQUENCE(DAY(EOMONTH(DATE(C2,B2,1),0)),,DATE(C2,B2,1))
Nov 07 2022 10:38 PM
Nov 07 2022 12:45 AM
Solution@Alvin1007 SEQUENCE() function can give you desired result. See the attached file.
=SEQUENCE(DAY(EOMONTH(DATE(C2,B2,1),0)),,DATE(C2,B2,1))