I have uploaded a sample file. It just doesn't have the userform. the userform will be the if statement as it has a multi page tab as 1 of the parts to the if statement and then a combo box for the other part both have to equal the values selected.
As i would not like ot just copy and paste the code for each if, then , elseif of each multi page tab and combo box configuration.
There are 6 multipages and the comboxbox would have 6 configurations (All,Half,Other Half,) for example
Hope this helps
It is basically i want this code in a multiple functions called by a sub that can call the correct function, depending on the multi page tab and combo box. With the functions i would like to change the amount of odd to even numbers picked ratio. So there would be multiple functions for example
(3 ODD 3 Even), or (4 Odd 2 Even). If i can have 1 array of 6 or 7 and do it in 1 array that would be better. I couldn't see how that part could be done so that is why i split it int o2 parts 1 for Odd and 1 to deal with Even.
NumArr.Clear
j = 1
Do Until j > 3
Set cell = RdmCell(rng)
' Consider only ODD numbers
If cell.Value Mod 2 = 1 Then ' this changes for odd and even
If Not cell.Value = "" And Not NumArr.contains(cell.Value) Then
NumArr.Add cell.Value
j = j + 1
End If
End If
Thank you for your help
Bookmarks