![]() |
Using "=randbetween" to select a number from a range of cells
I've just begun using =randbetween, bear with me!
I am trying to come up with a random number from a set of about 100 cells. The only numbers available in those 100 cells are 0 thru 4. Do I set my function to choose a random number between 0 and 4 (=randbetween(0,4)) or do I set it to pick a random number from the range of cells (=randbetween(A1:A100))? Is there going to be any difference in the data I come up with? |
Using "=randbetween" to select a number from a range of cells
(0,4)
the (A1:A100) would use the limits between whateverl values were in A1 and in A100 "a0xbjzz" wrote: I've just begun using =randbetween, bear with me! I am trying to come up with a random number from a set of about 100 cells. The only numbers available in those 100 cells are 0 thru 4. Do I set my function to choose a random number between 0 and 4 (=randbetween(0,4)) or do I set it to pick a random number from the range of cells (=randbetween(A1:A100))? Is there going to be any difference in the data I come up with? |
Using "=randbetween" to select a number from a range of cells
Do I set my function to choose a random number between 0 and 4
(=randbetween(0,4)) or do I set it to pick a random number from the range of cells (=randbetween(A1:A100))? You could do either but the range of cells should be just 2 cells that hold the boundaries: =RANDBETWEEN(0,4) Or: B1: =MIN(A1:A100) C1: =MAX(A1:A100) Then: =RANDBETWEEN(B1,C1) Or, you can put that all in the formula: =RANDBETWEEN(MIN(A1:A100),MAX(A1:A100)) -- Biff Microsoft Excel MVP "a0xbjzz" wrote in message ... I've just begun using =randbetween, bear with me! I am trying to come up with a random number from a set of about 100 cells. The only numbers available in those 100 cells are 0 thru 4. Do I set my function to choose a random number between 0 and 4 (=randbetween(0,4)) or do I set it to pick a random number from the range of cells (=randbetween(A1:A100))? Is there going to be any difference in the data I come up with? |
Using "=randbetween" to select a number from a range of cells
the (A1:A100) would use the limits between whateverl
values were in A1 and in A100 That'll return a #VALUE! error. -- Biff Microsoft Excel MVP "bj" wrote in message ... (0,4) the (A1:A100) would use the limits between whateverl values were in A1 and in A100 "a0xbjzz" wrote: I've just begun using =randbetween, bear with me! I am trying to come up with a random number from a set of about 100 cells. The only numbers available in those 100 cells are 0 thru 4. Do I set my function to choose a random number between 0 and 4 (=randbetween(0,4)) or do I set it to pick a random number from the range of cells (=randbetween(A1:A100))? Is there going to be any difference in the data I come up with? |
Using "=randbetween" to select a number from a range of cells
I am trying to come up with a random number from a set of about 100 cells.
The only numbers available in those 100 cells are 0 thru 4. HI. I think it depends on what you are doing. You didn't mention the distribution of the numbers. For example, if you only had 1-zero, 1-one, 1-two, 1-three, and 96 4's, then using =RANDBETWEEN(0,4) would give equal weight to each number. Depending on what you are doing, that may not be what you want. Another option might be to give a percentage weight to the number of each value. For example, if zero occured half the time, then using =RAND() might be an option. If value if <=0.5, then pick 0, ...etc. -- Dana DeLouis "a0xbjzz" wrote in message ... I've just begun using =randbetween, bear with me! I am trying to come up with a random number from a set of about 100 cells. The only numbers available in those 100 cells are 0 thru 4. Do I set my function to choose a random number between 0 and 4 (=randbetween(0,4)) or do I set it to pick a random number from the range of cells (=randbetween(A1:A100))? Is there going to be any difference in the data I come up with? |
All times are GMT +1. The time now is 05:04 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com