Home |
Search |
Today's Posts |
|
#1
![]() |
|||
|
|||
![]()
"Steved" wrote:
... I get a double on the same line .. I will overtime work out a solution using your program, If I'm not mistaken, you got duplicates on the same line for some lines as you didn't enter Bernd's UDF as a multi-cell array, re-his advice in his original response below: "Bernd Plumhoff" wrote: then select cells A1:F1 (< this range selection is important) enter: =UniqRandInt(40, false) as array formula (CTRL+SHIFT+ENTER) and copy this down to A10:F10. Probably you might have "wrongly" array-entered the UDF into a *single* cell, say A1, copied it across to F1, then filled A1:F1 down to F10. And that's why you got a few lines with duplicates within the same line. Try it again by selecting the range A1:F1 first, then paste into the *formula bar*: =UniqRandInt(40, FALSE) and array-enter with CSE The same formula (with curly braces inserted by Excel): {=UniqRandInt(40, FALSE)} will appear in every cell within A1:F1 but each cell will return a different number Then just select A1:F1 and fill down to say, F10, and there shouldn't be any more duplicates within the same line (for any one line) -- Rgds Max xl 97 --- Singapore, GMT+8 xdemechanik http://savefile.com/projects/236895 -- |
#2
![]() |
|||
|
|||
![]()
Hello Max from Steved
Yes I followed your instructions and yes their is no doubles Question Do I have to do this each time meaning why can I not push F9 to recalculate. At the moment when I push F9 nothing happens. Thankyou. "Max" wrote: "Steved" wrote: ... I get a double on the same line .. I will overtime work out a solution using your program, If I'm not mistaken, you got duplicates on the same line for some lines as you didn't enter Bernd's UDF as a multi-cell array, re-his advice in his original response below: "Bernd Plumhoff" wrote: then select cells A1:F1 (< this range selection is important) enter: =UniqRandInt(40, false) as array formula (CTRL+SHIFT+ENTER) and copy this down to A10:F10. Probably you might have "wrongly" array-entered the UDF into a *single* cell, say A1, copied it across to F1, then filled A1:F1 down to F10. And that's why you got a few lines with duplicates within the same line. Try it again by selecting the range A1:F1 first, then paste into the *formula bar*: =UniqRandInt(40, FALSE) and array-enter with CSE The same formula (with curly braces inserted by Excel): {=UniqRandInt(40, FALSE)} will appear in every cell within A1:F1 but each cell will return a different number Then just select A1:F1 and fill down to say, F10, and there shouldn't be any more duplicates within the same line (for any one line) -- Rgds Max xl 97 --- Singapore, GMT+8 xdemechanik http://savefile.com/projects/236895 -- |
#3
![]() |
|||
|
|||
![]()
Hello from Steved
If I highlight the cells A1:F10 edit delete cells and then undo redo it recalculates interesting so what have I not done to allow this to recalculate please. Thankyou. "Steved" wrote: Hello Max from Steved Yes I followed your instructions and yes their is no doubles Question Do I have to do this each time meaning why can I not push F9 to recalculate. At the moment when I push F9 nothing happens. Thankyou. "Max" wrote: "Steved" wrote: ... I get a double on the same line .. I will overtime work out a solution using your program, If I'm not mistaken, you got duplicates on the same line for some lines as you didn't enter Bernd's UDF as a multi-cell array, re-his advice in his original response below: "Bernd Plumhoff" wrote: then select cells A1:F1 (< this range selection is important) enter: =UniqRandInt(40, false) as array formula (CTRL+SHIFT+ENTER) and copy this down to A10:F10. Probably you might have "wrongly" array-entered the UDF into a *single* cell, say A1, copied it across to F1, then filled A1:F1 down to F10. And that's why you got a few lines with duplicates within the same line. Try it again by selecting the range A1:F1 first, then paste into the *formula bar*: =UniqRandInt(40, FALSE) and array-enter with CSE The same formula (with curly braces inserted by Excel): {=UniqRandInt(40, FALSE)} will appear in every cell within A1:F1 but each cell will return a different number Then just select A1:F1 and fill down to say, F10, and there shouldn't be any more duplicates within the same line (for any one line) -- Rgds Max xl 97 --- Singapore, GMT+8 xdemechanik http://savefile.com/projects/236895 -- |
#4
![]() |
|||
|
|||
![]()
"Steved" wrote
.. so what have I not done to allow this to recalculate please. Nothing <g. Because Bernd's UDF is not volatile, as he had explained earlier. If you want it to recalc on pressing F9, try using JE's RandInt() UDF (see link provided by Dave P earlier) -- Rgds Max xl 97 --- Singapore, GMT+8 xdemechanik http://savefile.com/projects/236895 -- |
#5
![]() |
|||
|
|||
![]()
Thankyou Max Understood
I just was'nt thinking "Max" wrote: "Steved" wrote .. so what have I not done to allow this to recalculate please. Nothing <g. Because Bernd's UDF is not volatile, as he had explained earlier. If you want it to recalc on pressing F9, try using JE's RandInt() UDF (see link provided by Dave P earlier) -- Rgds Max xl 97 --- Singapore, GMT+8 xdemechanik http://savefile.com/projects/236895 -- |
#6
![]() |
|||
|
|||
![]()
You're welcome, Steved !
Btw, I've just posted a response to RagDyeR in the other branch It's an adaptation of a past, concise solution by Harlan to suit your situation. You might want to check it out as well .. -- Rgds Max xl 97 --- Singapore, GMT+8 xdemechanik http://savefile.com/projects/236895 -- |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Seed numbers for random number generation, uniform distribution | Excel Discussion (Misc queries) | |||
random numbers, how can you utilize it without repeating them | Excel Discussion (Misc queries) | |||
random numbers from a data of numbers? | Excel Worksheet Functions | |||
Validating random numbers | Excel Worksheet Functions | |||
Random Numbers Change? | Excel Worksheet Functions |