Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Hi all, I would like to add a column to my spreadsheet with randomly
generated 1's and 0's. I would like to be able to set the probability with which these are generated, eg each time the number is generated there is a 20% probability that it will be 1, and 80% that it will be zero. Would appreciate it STACKS if someone could help me out! |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
One way to do it would be to add a staging column containing formula =RAND()
On next column, enter formula =IF(A10.2;0;1) HTH -- AP "Ian Engelbrecht" a écrit dans le message de ... Hi all, I would like to add a column to my spreadsheet with randomly generated 1's and 0's. I would like to be able to set the probability with which these are generated, eg each time the number is generated there is a 20% probability that it will be 1, and 80% that it will be zero. Would appreciate it STACKS if someone could help me out! |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Even simpler (no staging column)
=IF(RAND()0.2,0,1) HTH -- AP "Ian Engelbrecht" a écrit dans le message de ... Hi all, I would like to add a column to my spreadsheet with randomly generated 1's and 0's. I would like to be able to set the probability with which these are generated, eg each time the number is generated there is a 20% probability that it will be 1, and 80% that it will be zero. Would appreciate it STACKS if someone could help me out! |
#4
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Good call. I like it!
Andy. "Ardus Petus" wrote in message ... One way to do it would be to add a staging column containing formula =RAND() On next column, enter formula =IF(A10.2;0;1) HTH -- AP "Ian Engelbrecht" a écrit dans le message de ... Hi all, I would like to add a column to my spreadsheet with randomly generated 1's and 0's. I would like to be able to set the probability with which these are generated, eg each time the number is generated there is a 20% probability that it will be 1, and 80% that it will be zero. Would appreciate it STACKS if someone could help me out! |
#5
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
In column A:
=RANDBETWEEN(1,100) Fill down as far as needed In column B: =IF(RIGHT(A1,1)"8",0,1) (of course "8" can be something else) Fill down -- Kind regards, Niek Otten "Ian Engelbrecht" wrote in message ... Hi all, I would like to add a column to my spreadsheet with randomly generated 1's and 0's. I would like to be able to set the probability with which these are generated, eg each time the number is generated there is a 20% probability that it will be 1, and 80% that it will be zero. Would appreciate it STACKS if someone could help me out! |
#6
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Thanks a lot for the help folks, much appreciated!
"Ardus Petus" wrote: Even simpler (no staging column) =IF(RAND()0.2,0,1) HTH -- AP "Ian Engelbrecht" a écrit dans le message de ... Hi all, I would like to add a column to my spreadsheet with randomly generated 1's and 0's. I would like to be able to set the probability with which these are generated, eg each time the number is generated there is a 20% probability that it will be 1, and 80% that it will be zero. Would appreciate it STACKS if someone could help me out! |
#7
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]() ....or even.... =(RAND()<0.2)+0 -- daddylonglegs ------------------------------------------------------------------------ daddylonglegs's Profile: http://www.excelforum.com/member.php...o&userid=30486 View this thread: http://www.excelforum.com/showthread...hreadid=528597 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Conditional Format as a MACRO | Excel Worksheet Functions | |||
Need to Improve Code Copying/Pasting Between Workbooks | Excel Discussion (Misc queries) | |||
creating a bar graph | Excel Discussion (Misc queries) | |||
How to group similar column titles together???? | Excel Discussion (Misc queries) | |||
Return Count for LAST NonBlank Cell in each Row | Excel Worksheet Functions |