• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Days of Week Permutation Listing

Steve Morris

New Member
I am trying to create a list of all possible days of week possibilities. It appears that there are over 5,000 variations based on the permutation. The goal is to provide a reference of each possible scenario based on a "1" representing the actual day referenced.

The enclosed spreadsheet shows the pattern that I am trying to develop that would be a table for a vlookup from reports that indicate a day of service by the number "1". Developing every possibility with the string of 7 digits that can also be converted to the day initials. The initial would be the first letter of the week with H being Thursday and U being
Sunday.
 

Attachments

  • Days of Service Lookup.xlsx
    63.1 KB · Views: 28
Isn't there only 127 combinations?

See attached solution

Column I drives the calculations
 

Attachments

  • Days of Service Lookup.xlsx
    66 KB · Views: 53
Last edited:
Hi ,

It is not very clear what you want to do.

Can we first describe the problem without any reference to your workbook ?

There are 7 days in a week ; we can represent them by the letters :

M - Monday

T - Tuesday

W - Wednesday

H - Thursday

F - Friday

S - Saturday

U - Sunday

If you really mean permutation , where order is important , then we can have 7! ( 7 factorial ) different permutations , which equals 5040 , assuming that we are using all 7 days of the week for every permutation.

Thus starting with the first permutation , which can be the natural calendar order , we will have the permutation MTWHFSU ; the last permutation can be the fully reversed order of USFHWTM.

These 5040 permutations cannot be derived from the binary representation of 1s and 0s , since if we are going to have only 7 ones and zeros , the maximum number that we can achieve using 7 binary digits is 2 raised to the power 7 , which is 128.

Secondly , if you are going to include even other combinations such as the 7 days on their own , permutations of 2 days at a time , permutations of 3 days at a time , and so on , then the total number possible is much more than 5040.

If you can explain what exactly you want to do , without any reference to your uploaded workbook , then a more elegant data representation and solution can be arrived at.

Narayan
 
Whoops there was small mistake above
Corrected below
The corrected version will get the job done since it only needs to contain the day and not necessarily in a specific order. I ran the permutation formula and assumed the 5,000 was correct.

Thanks for all of your help with this.
 
Back
Top