# Weighted Probabilities with random numbers

#### senx7810

##### New Member
Hi guys, this has been killing me but does anyone know how to incorporate weighted probabilities with random numbers? For example:

I need to have a random number between 1-9 and have these probabilities:
 1 5% 2 10% 3 0% 4 20% 5 30% 6 10% 7 10% 8 10% 9 5%

<tbody>
</tbody>

Any help would be much appreciated!

I just need a formula please and thank you.

### Excel Facts

To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.
Welcome to the board.

=match(rand(), {0;5;15;15;35;65;75;85;95}%)

Thank you so much!

You're welcome.

Welcome to the board.

=match(rand(), {0;5;15;15;35;65;75;85;95}%)

Hi shg - how does this work?

Not being a mathematician, I can't see immediately the relationship between the percentages senx7810 wanted and the number you put in the curly brackets.

Thanks

Replies
14
Views
737
Replies
41
Views
2K
Replies
5
Views
213
Replies
9
Views
151
Replies
0
Views
183

### Forum statistics

1,203,489
Messages
6,055,722
Members
444,814
Latest member
AutomateDifficulty

### We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.

### Which adblocker are you using?

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

### Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

### Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back