View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
smartin smartin is offline
external usenet poster
 
Posts: 915
Default Formula for number combinations.

The Deacon wrote:
Hi,

I need help. I am trying to figure out the best formula to use in
extracting 6 number combinations from a group of 12. For instance in one
group I have odd numbers (1-11) and the other group has even numbers (2-12).
The numbers in eaach group can not repeat (hope I didnt confuse anyone). I
will perform this function on an Excel worksheet.

Example

1 3 5 7 9 11
2 4 6 8 10 12

One possible out come would be 1 4 5 8 9 12. Keep in mind that 1 and 2, 3
and 4, etc. can not be in the same group. Can anyone help?

The Deacon


If I understand correctly, suppose your numbers are in A1:F2. Then place
this formula in A3 and fill (copy) through F3:

=INDEX(A1:A2,RANDBETWEEN(1,2))

Every time the worksheet recalculates, or when you press F9, a new
sequence of random selections will appear.