Home > Enterprise >  Populating columns with days based on a selection
Populating columns with days based on a selection

Time:01-25

I am trying to build a sleep tracker in Google Sheets (enter image description here

Then, repeat the sequence in both rows starting in C2 and C3:

=SEQUENCE(1,DAY(EOMONTH(A2,0)),A2)

But formatting row 3 as ddd:

enter image description here

PS: yes, you can do row 3 with TEXT and INDEX. Choose your preferred one:

=INDEX(TEXT(SEQUENCE(1,DAY(EOMONTH(A2,0)),A2),"dddd"))

UPDATE with TEXT VALUES

Return to your previous A2 dropdown and try this, using MATCH to find the number of the month, and DATE to locate the correct beginning of the month in that year:

For row 2:

    =SEQUENCE(1,DAY(EOMONTH(DATE(A1,MATCH(A2,{"January","February","March","April","May","June","July","September","October","November","December"},0),1),0)),
DATE(A1,MATCH(A2,{"January","February","March","April","May","June","July","September","October","November","December"},0),1))

For row 3:

=INDEX(TEXT(SEQUENCE(1,DAY(EOMONTH(DATE(A1,MATCH(A2,{"January","February","March","April","May","June","July","September","October","November","December"},0),1),0)),
DATE(A1,MATCH(A2,{"January","February","March","April","May","June","July","September","October","November","December"},0),1)),"dddd")

)

  • Related