ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Formula for number combinations. (https://www.excelbanter.com/excel-worksheet-functions/243983-formula-number-combinations.html)

The Deacon[_2_]

Formula for number combinations.
 
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

smartin

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.

Ms-Exl-Learner

Formula for number combinations.
 
Try this...

Paste this below function in A2 Cell for Even Numbers.
=IF(A1=EVEN(ROW()),EVEN(ROW())+200,EVEN(ROW()))

Paste this below function in B2 Cell for ODD Numbers.
=IF(B1=ODD(ROW()),ODD(ROW()+199),ODD(ROW()))

and drag it to the remaining cells.

But dont take this as the final method for this query, I just tried from my
end whatever I know. But if you are making this formula more than 200 cells
then it will create duplicates, so change the 200 to 500 when you are going
beyond 200 rows.

If this post helps, Click Yes!

--------------------
(Ms-Exl-Learner)
--------------------



"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


Bernd P

Formula for number combinations.
 
Hello,

Select 6 adjacent cells horizontally and array-enter:
={2,4,6,8,10,12}-INT(RAND()*2)

Regards,
Bernd


All times are GMT +1. The time now is 02:17 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com