Excel

Copper Contributor

Looking for formular to list every 5 digit combination out of 15 numbers without repeating 4 digits

1 Reply

@TBertot432 

If you want to generate all possible combinations of 5 digits out of a set of 15 numbers without repeating any 4 digits, you can use Excel formulas to achieve this. Assuming your numbers are in a column (let's say in column A from A1 to A15), you can use the following steps:

  1. Create Helper Columns:
    • In column B, use the formula =A1&" "&A2&" "&A3&" "&A4&" "&A5 in cell B1. This concatenates the first 5 numbers into a single string.
    • Drag the formula down for the entire column B.
  2. Remove Duplicates:
    • Select column B.
    • Go to the "Data" tab and click on "Remove Duplicates."
    • Choose only column B and click "OK." This removes duplicates, ensuring that no 4 digits are repeated.

Now, column B contains all unique combinations of 5 digits from the original set of 15 numbers.

If you want each digit to be in a separate column, you can use Text-to-Columns:

  1. Text-to-Columns:
    • Select column B.
    • Go to the "Data" tab and click on "Text-to-Columns."
    • Choose "Delimited" and click "Next."
    • Choose "Space" as the delimiter and click "Finish."

Now, each column (B to F) will contain one digit from each combination.

Note: If your requirement is to create a list of all combinations programmatically without using helper columns, it involves a more complex process and might be better suited for a programming language or script rather than Excel formulas. If you need such a solution, please let me know, and I can guide you accordingly. AI was partially deployed to support the text.

 

My answers are voluntary and without guarantee!

 

Hope this will help you.

Was the answer useful? Mark as best response and Like it!

This will help all forum participants.