Home |
Search |
Today's Posts |
|
#1
![]() |
|||
|
|||
![]()
The only problem with your formula is that you'll *never* get a "9".
This bug (wrong information) has been around for years in the Help files, where I'll bet, is where you got this formula from. Try this instead: =INT(RAND()*(9)+1) -- HTH, RD ============================================== Please keep all correspondence within the Group, so all may benefit! ============================================== "BaldySlaphead" wrote in message news:BaldySlaphead.1s45mw_1121267162.1931@excelfor um-nospam.com... Thank you, sir, that works fine! :) -- BaldySlaphead ------------------------------------------------------------------------ BaldySlaphead's Profile: http://www.excelforum.com/member.php...fo&userid=1260 View this thread: http://www.excelforum.com/showthread...hreadid=386779 |
#2
![]() |
|||
|
|||
![]()
Actually, the info is correct, *except* when using Int().
Either of these produce the range you want (1 to 9): =ROUND(RAND()*(9-1)+1,0) =INT(RAND()*(9)+1) -- HTH, RD ============================================== Please keep all correspondence within the Group, so all may benefit! ============================================== "RagDyeR" wrote in message ... The only problem with your formula is that you'll *never* get a "9". This bug (wrong information) has been around for years in the Help files, where I'll bet, is where you got this formula from. Try this instead: =INT(RAND()*(9)+1) -- HTH, RD ============================================== Please keep all correspondence within the Group, so all may benefit! ============================================== "BaldySlaphead" wrote in message news:BaldySlaphead.1s45mw_1121267162.1931@excelfor um-nospam.com... Thank you, sir, that works fine! :) -- BaldySlaphead ------------------------------------------------------------------------ BaldySlaphead's Profile: http://www.excelforum.com/member.php...fo&userid=1260 View this thread: http://www.excelforum.com/showthread...hreadid=386779 |
#3
![]() |
|||
|
|||
![]() RagDyeR Wrote: Actually, the info is correct, *except* when using Int(). Either of these produce the range you want (1 to 9): =ROUND(RAND()*(9-1)+1,0) =INT(RAND()*(9)+1) -- HTH, RD RD, Many thanks for your assistance. You're quite correct that it wasn't generating a 9 - I must have kept F9 depressed for a couple of minutes and not one sign - okay, it could happen but I'm willing to accept you're right and the formula doesn't work! ;) I have an additional enquiry, out of pure interest. Would I be able to record which number is generated in any way? What I imagined was setting up an additional COL 'Results' and then trying to increment an if A13=1 then x=x+1 style argument for each unique line to increment the count each time the screen was refreshed. Thus I could see how often a number was picked by the RAND. Is this possible, and how might I do it? Any comments gratefully received. Regards, Baldy -- BaldySlaphead ------------------------------------------------------------------------ BaldySlaphead's Profile: http://www.excelforum.com/member.php...fo&userid=1260 View this thread: http://www.excelforum.com/showthread...hreadid=386779 |
#4
![]() |
|||
|
|||
![]()
I don't know where or how you're utilizing the returns of your formula, but
wouldn't simply copying it down a column give you the type of list that you're looking for? You could remove the formulas, via <Copy - PasteSpecial - Values, leaving the random numbers behind. "BaldySlaphead" wrote in message news:BaldySlaphead.1s5jmi_1121331920.9348@excelfor um-nospam.com... RagDyeR Wrote: Actually, the info is correct, *except* when using Int(). Either of these produce the range you want (1 to 9): =ROUND(RAND()*(9-1)+1,0) =INT(RAND()*(9)+1) -- HTH, RD RD, Many thanks for your assistance. You're quite correct that it wasn't generating a 9 - I must have kept F9 depressed for a couple of minutes and not one sign - okay, it could happen but I'm willing to accept you're right and the formula doesn't work! ;) I have an additional enquiry, out of pure interest. Would I be able to record which number is generated in any way? What I imagined was setting up an additional COL 'Results' and then trying to increment an if A13=1 then x=x+1 style argument for each unique line to increment the count each time the screen was refreshed. Thus I could see how often a number was picked by the RAND. Is this possible, and how might I do it? Any comments gratefully received. Regards, Baldy -- BaldySlaphead ------------------------------------------------------------------------ BaldySlaphead's Profile: http://www.excelforum.com/member.php...fo&userid=1260 View this thread: http://www.excelforum.com/showthread...hreadid=386779 |
#5
![]() |
|||
|
|||
![]() RagDyeR Wrote: I don't know where or how you're utilizing the returns of your formula, but wouldn't simply copying it down a column give you the type of list that you're looking for? You could remove the formulas, via <Copy - PasteSpecial - Values, leaving the random numbers behind. I don't believe so! Every time I refresh the data, the Rand will recalculate. For a bit of fun, I wanted to record that the Rand had generated the result 1 ten times, 2 seven time, 3 not at all etc etc. -- BaldySlaphead ------------------------------------------------------------------------ BaldySlaphead's Profile: http://www.excelforum.com/member.php...fo&userid=1260 View this thread: http://www.excelforum.com/showthread...hreadid=386779 |
#6
![]() |
|||
|
|||
![]()
Like I said, I don't know *how* you're using your data, but copying that
formula down a column, and then eliminating the formula, leaving the random numbers behind, gives you a list of random numbers that you can *USE* by polling down that column, in the same way that you're using the return of the single formula. If you can do that (use the random numbers in the list), then you have exactly what you're looking for, and you'll even know ahead of time, exactly what random return will be used next. -- Regards, RD -------------------------------------------------------------------- Please keep all correspondence within the Group, so all may benefit ! -------------------------------------------------------------------- "BaldySlaphead" wrote in message news:BaldySlaphead.1sgvzi_1121861306.506@excelforu m-nospam.com... RagDyeR Wrote: I don't know where or how you're utilizing the returns of your formula, but wouldn't simply copying it down a column give you the type of list that you're looking for? You could remove the formulas, via <Copy - PasteSpecial - Values, leaving the random numbers behind. I don't believe so! Every time I refresh the data, the Rand will recalculate. For a bit of fun, I wanted to record that the Rand had generated the result 1 ten times, 2 seven time, 3 not at all etc etc. -- BaldySlaphead ------------------------------------------------------------------------ BaldySlaphead's Profile: http://www.excelforum.com/member.php...fo&userid=1260 View this thread: http://www.excelforum.com/showthread...hreadid=386779 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
conditional formating | Excel Discussion (Misc queries) | |||
Conditional Formating | Excel Discussion (Misc queries) | |||
Conditional Formating Extreme Question | Excel Worksheet Functions | |||
Conditional Formating | Excel Discussion (Misc queries) | |||
more than 3 conditional formating in excel | Excel Discussion (Misc queries) |