#1
|
|||
|
|||
Random Sequencing
Hello all,
I am looking for help with this vba problem i have. I have a system that accepts 3 types of demand in bulk. Each bulk has quantities in it. I have been able to split this quantities randomly from 1 to 5 splits before going into the system sequencially. But now i want these splits to go in a random sequence with no same type following each other. For example Type 1: 5 quantities; splitted into 2,3 Type 2: 7 quantities; splitted into 3,4 Type 3: 6 quantities; splitted into 1,1,1,1,2 And they go into the system in that sequence: 2,3,3,4,1,1,1,1,2 But i want to sequence to be random with no two of the same type following each other. Please how can I achieve this with code. Thanks |
#2
|
|||
|
|||
Sequence problem
I created a process simulation using excel vba that chooses number of items from type 1 to number of types. I generate a random split between 2 and number of splits of each type. But the splits get executed sequentially from type 1, 2, ....
Is there a way to make split execute randomly with different results every time and doesn't repeat the same type except no split of other type left to randomise with. Also, first type not necessarily be the first to execute and the last not necessarily the last to execute. I could't begin to think of what is the syntax to begin with. For instance: Type 1, 10 items of splits 2,1,2,5 Type 2, 5 items of splits 2,3 Type 3, 7 items of splits 2, 2, 3 Currently the process execute in (T1,2) (T1,1) (T1,2) (T1,5); (T2,2) (T2,3) ;(T3,2) (T3,2) (T3,3) Intended process execution (T1, 2) (T2,2) (T1,1) (T3,2) (T2,3) (T1, 2) (T3, 2) (T1, 5) (T3, 3) PLS NOTE: OUT OF IGNORANCE I HAVE THE SAME POST ON http://www.mrexcel.com/forum/excel-q...e-problem.html http://www.excelforum.com/showthread...89#post4557189 PLS ACCEPT MY APOLOGIES Last edited by victor222; 01-10-2017 at 04:09 PM. Reason: CROSS POSTING |
#3
|
||||
|
||||
Please do not cross post without links
Read http://www.excelguru.ca/content.php?184 to understand what it's about and add links to ALL your cross-posts. Thanks
__________________
Did you know you can thank someone who helped you? Click on the tiny scale in the right upper hand corner of your helper's post |
Tags |
random sequence, vba |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Random with Kurtosis | ramesh31 | Excel | 0 | 02-18-2016 03:45 AM |
Sequencing duplicates | balajigade | Excel Programming | 3 | 10-04-2015 03:31 PM |
Random Name Generator | knp11 | Word | 1 | 01-18-2015 11:41 AM |
Random indentation | Galahad | Word | 1 | 09-25-2013 11:05 AM |
random pop up wont go away | 464646 | OneNote | 0 | 05-01-2012 04:34 AM |