Calculation Problem, Multiple Subroutines

J

Jonas

I am going to create an MS Excel program that calculates odds of
horses coming in different places given the probability of each coming
in first using the Harville formula. I would like to create my
program so that it can accommodate different numbers of horses in the
race. I'm pretty certain that I can figure out how to make up a
program so that I have a subroutine to figure out the probability of
each place but I don't know if I know the best way to create one
subroutine that would calculate the probability for all horses for all
places.

From what I can tell, I would have to have the program change the code
on the fly to add variables for each new place. If I wanted to create
code on the fly, I could use code similar to what is at the bottom of
the following link: http://www.ozgrid.com/forum/showthread.php?t=66426.
Do you have any suggestions?

Your response is appreciated.
 
B

Bob Phillips

Sounds very unlikely that you need to change code on the fly, better to have
some variable determining the number of horses.

Show the code for say three horses, and then show what it would be for 4 as
you see it, we can then show you how to make it variable.

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)
 
J

Jonas

Sounds very unlikely that you need to change code on the fly, better to have
some variable determining the number of horses.

Show the code for say three horses, and then show what it would be for 4 as
you see it, we can then show you how to make it variable.

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)








- Show quoted text -

I think that I am going to make up a spreadsheet solution to get the
intermediate calculations too rather than program.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top