RAND gives #n/a

beng986

Board Regular
Joined
Jan 10, 2012
Messages
88
hi,

in excel I have

[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]Sex[/TD]
[TD]Probability[/TD]
[TD]Cumulative Prob[/TD]
[/TR]
[TR]
[TD]M[/TD]
[TD]80%[/TD]
[TD]80%[/TD]
[/TR]
[TR]
[TD]F[/TD]
[TD]20%[/TD]
[TD]100%[/TD]
[/TR]
</tbody>[/TABLE]

These are in a sheet called probability of Client and run from cells E1 to G3.

In another worksheet i have put the below formula in. Most of the time the result is #n/a with the occasional 'M'. How can i choose this so either M or F is picked in line with the probability above.

=INDEX('Probability of client'!$E$2:$E$3,MATCH(RAND(),'Probability of client'!$G$2:$G$3))

thanks
 

Excel Facts

Quick Sum
Select a range of cells. The total appears in bottom right of Excel screen. Right-click total to add Max, Min, Count, Average.
You should know the forum rules on cross-posting by now (if not, please familiarise yourself with them now) so please add links to your cross-post(s).
 
Upvote 0

Forum statistics

Threads
1,223,712
Messages
6,174,031
Members
452,542
Latest member
Bricklin

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.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

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

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

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
Back
Top