0

I have an array of 31 elements in Libreoffice Calc which I have to fill automatically with the days of the week (Mon, Tue, Wed, Thur, Fri, Sat, Sun, Mon, etc...) setting only the first element of the array (ideally with a dropdown menu).

How can I do that?

0

First place the days of the week in cells A1 through A7. This is the list we will use for Data Validation. Then put the Data Validation pull-down in cell B1. Pick any day.

In C1 enter:

 =MATCH(B1,A1:A7,0)

In C2 enter:

 =IF(C1+1=8,1,C1+1)

and copy C2 downwards.

Finally in B2 enter:

=INDEX(A$1:A$7,C2)

and copy downwards:

enter image description here

Note:

  • you can pick any value from the pull-down to fill cell B1 and the rest will increment cyclically downwards
  • you can use this trick to propagate any cyclically repeating data. (like months, etc.)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.