CassAsvestas
New Member
- Joined
- Oct 17, 2014
- Messages
- 4
I am trying to form an "if" function. Given set probabilities a certain number of magazines are sold. In this situation a randomly generated number (rand()) is checked against a probability range from (0-1.0) generates a given value for those specific ranges (0-.5 is 50, .5-.15 is 75 ... for example), but keeps running the test until it gets an answer that is less then or equal to 100 magazines. In this case the .15-.4 ptobability range.
The closest I have gotten is:
=lookup(rand(),$J$11:$J$16,$H$11:$H$16)
When I do
=if((lookup(rand(),$J$11:$J$16,$H$11:$H$16))<=$J$18,B5,lookup(rand(),$J$11:$J$16,$H$11:$H$16))
It still doesn't come up with the values <= J18
I'd appreciate any assistance or advice you can provide.
The closest I have gotten is:
=lookup(rand(),$J$11:$J$16,$H$11:$H$16)
When I do
=if((lookup(rand(),$J$11:$J$16,$H$11:$H$16))<=$J$18,B5,lookup(rand(),$J$11:$J$16,$H$11:$H$16))
It still doesn't come up with the values <= J18
I'd appreciate any assistance or advice you can provide.