Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Calculation Problem, Multiple Subroutines
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. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Calculation Problem, Multiple Subroutines
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) "Jonas" wrote in message ... 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. |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Calculation Problem, Multiple Subroutines
On Feb 8, 4:44*am, "Bob Phillips" wrote:
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) "Jonas" wrote in message ... 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.- Hide quoted text - - Show quoted text - I think that I am going to make up a spreadsheet solution to get the intermediate calculations too rather than program. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Multiple calculation problem | Excel Discussion (Misc queries) | |||
Screen Updating problem with nested subroutines | Excel Programming | |||
problem breaking macro into 2 subroutines | Excel Programming | |||
Subroutines vs. modules | Excel Programming | |||
Run method for subroutines | Excel Programming |