ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Excel - randomization with certain criteria (https://www.excelbanter.com/excel-worksheet-functions/142967-excel-randomization-certain-criteria.html)

Alen Paliska

Excel - randomization with certain criteria
 
I'm trying to develop a sheet that creates six random number from given list
of data. I've already found the solution for that but there are some
conditions that has to be fulfilled and I don't know how to solve it, so I
was hoping that somebody can help me.
A little explanation of the problem: on international amateur boxing
championship, computer has to automatically draw the list of 1 referee
(judge in the ring) and 5 judges (judges around the ring) from the list of
available judges, but:
1. referee and judges must not be from the countries of participants in the
ring and 2. referee can not be in the ring twice in the roll
If somebody know answer to this problem, I would appreciate it.
Thank you in advance.


joel

Excel - randomization with certain criteria
 
The two methods normally used are

1) Eliminate the inelligable judges before picking tthe random judge

2) Keep on picking judges until one that meets the requirements.

"Alen Paliska" wrote:

I'm trying to develop a sheet that creates six random number from given list
of data. I've already found the solution for that but there are some
conditions that has to be fulfilled and I don't know how to solve it, so I
was hoping that somebody can help me.
A little explanation of the problem: on international amateur boxing
championship, computer has to automatically draw the list of 1 referee
(judge in the ring) and 5 judges (judges around the ring) from the list of
available judges, but:
1. referee and judges must not be from the countries of participants in the
ring and 2. referee can not be in the ring twice in the roll
If somebody know answer to this problem, I would appreciate it.
Thank you in advance.



Alen Paliska

Excel - randomization with certain criteria
 
yes, it's true, but each draw has to be done only once, and to be completely
honest, I'm not that experienced in Excel VBA to develop it on my own... :(

"Joel" wrote in message
...
The two methods normally used are

1) Eliminate the inelligable judges before picking tthe random judge

2) Keep on picking judges until one that meets the requirements.

"Alen Paliska" wrote:

I'm trying to develop a sheet that creates six random number from given
list
of data. I've already found the solution for that but there are some
conditions that has to be fulfilled and I don't know how to solve it, so
I
was hoping that somebody can help me.
A little explanation of the problem: on international amateur boxing
championship, computer has to automatically draw the list of 1 referee
(judge in the ring) and 5 judges (judges around the ring) from the list
of
available judges, but:
1. referee and judges must not be from the countries of participants in
the
ring and 2. referee can not be in the ring twice in the roll
If somebody know answer to this problem, I would appreciate it.
Thank you in advance.




joel

Excel - randomization with certain criteria
 
With random number one draw is usually defined as picking until a valid item
is drawn.

If you would write code to pick a lottery number.The game requires you to
pick three number 1-10. You can only have each number picked once.


A = Int((9 * Rnd(x)) + 1)

B = -1
Do While B < A

B = Int((9 * Rnd(x)) + 1)
Loop


C = -1
Do While (C < A) And (C < B)

C = Int((9 * Rnd(x)) + 1)
Loop


"Alen Paliska" wrote:

yes, it's true, but each draw has to be done only once, and to be completely
honest, I'm not that experienced in Excel VBA to develop it on my own... :(

"Joel" wrote in message
...
The two methods normally used are

1) Eliminate the inelligable judges before picking tthe random judge

2) Keep on picking judges until one that meets the requirements.

"Alen Paliska" wrote:

I'm trying to develop a sheet that creates six random number from given
list
of data. I've already found the solution for that but there are some
conditions that has to be fulfilled and I don't know how to solve it, so
I
was hoping that somebody can help me.
A little explanation of the problem: on international amateur boxing
championship, computer has to automatically draw the list of 1 referee
(judge in the ring) and 5 judges (judges around the ring) from the list
of
available judges, but:
1. referee and judges must not be from the countries of participants in
the
ring and 2. referee can not be in the ring twice in the roll
If somebody know answer to this problem, I would appreciate it.
Thank you in advance.






All times are GMT +1. The time now is 05:59 PM.

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