5-digit combination

achile.2.3 -  
proviste Posted messages 19 Status Membre -
Hello,
I would like to obtain all combinations of 5 digits (without duplicates), in the form of an Excel table
for example
I have 20 numbers (1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20)
I would like to get ALL THE COMBINATIONS of 5 digits in any order (with 14, then 15, then 16, then 17, then 18, then 19, and finally 20 digits)
1 5 3 8 9
18 20 11 6 7
3 6 8 4 1
6 7 5 12 18
etc etc etc

if someone can help me IN THE FORM OF AN EXCEL TABLE
I don't know much about formulas
Thank you
Achile

Configuration: Windows XP / Internet Explorer 8.0
Configuration: Windows XP / Internet Explorer 8.0

26 réponses

  • 1
  • 2
JeDetesteMaPSP Posted messages 1766 Registration date   Status Membre Last intervention   424
 
I don't understand, at worst make a spreadsheet to put the values in, but I'm not sure it will work.
What is this table for?

At worst we can program it in PHP/C++/JS (I only know how to do it in PHP and even then it's mediocre but after it's pretty much the same...).
You need to put a value in a cell and generate a number in a loop

if $completed_table = // number of possible combinations

while $completed_table = // number of possible combinations
echo $A = 1
$A++


And the same until E?
No? Something like that? I'm not managing sorry =(.
I'm just starting =(.
By the way, the " // " means comments :P.
To calculate the number of possibilities you have to do this.

Number of columns (for example 5)
And the maximum number of possibilities t( 20 right? )
And then you subtract 1 each time
20 x 19 x 18 x 17 x 16
( there are 5 int/float values (numbers :P ) that I subtracted one when I moved from value, did you understand? :D ).
--
Sorry for my not very pleasant writing let's say :D.
26
  • 1
  • 2