SOLVED

Display number of days in different months.

Copper Contributor

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?

 

2 Replies
best response confirmed by Hans Vogelaar (MVP)
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))

Harun24HR_0-1667810584221.png

 

 

Dear Mr. Harun24HR.
How wonderful you are! Thanks a lot for your support. You are my life saver. It makes my timesheet easiest than ever.
Thanks again.
1 best response

Accepted Solutions
best response confirmed by Hans Vogelaar (MVP)
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))

Harun24HR_0-1667810584221.png

 

 

View solution in original post