Help With VBA in Excel ? Writing a function using probabilities ?

BadAtMath

New Member
Joined
Mar 24, 2011
Messages
1
Help With VBA in Excel ? Writing a function using probabilities ?

I need help writing a function in VB in excel that decides the winner of a game, the probabilities are input into an excel worksheet by the user. There are 2 players and 4 different probabilities for each player:

a = probability of first shot being allowed
b = probability of winning first shot
c = probability of second shot being allowed
d = probability of winning second shot

The game is played between 2 players, in each game one is chosen to be the server and the other the receiver. Service alternates game by game. A single game consists of a sequence of points played with the same player serving. A game is won when a player has (a) scored four or more points and (b) has two or more points more than his opponent

My function needs to take the server (chosen at random) and return the winner of a particular point, calculated according to the above probabilities.

I have NO idea where to start here, any help please?????
 

Excel Facts

Remove leading & trailing spaces
Save as CSV to remove all leading and trailing spaces. It is faster than using TRIM().

Forum statistics

Threads
1,224,531
Messages
6,179,384
Members
452,908
Latest member
MTDelphis

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