Formula for number combinations.

T

The Deacon

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
 
M

Ms-Exl-Learner

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!
 
B

Bernd P

Hello,

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

Regards,
Bernd
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top