Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 16
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 16
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Multiple calculation problem tartan tim Excel Discussion (Misc queries) 5 April 30th 08 02:49 AM
Screen Updating problem with nested subroutines Atreides Excel Programming 4 February 7th 07 05:25 AM
problem breaking macro into 2 subroutines [email protected] Excel Programming 2 March 23rd 06 07:05 PM
Subroutines vs. modules BrianG[_4_] Excel Programming 0 September 7th 04 10:21 PM
Run method for subroutines Scott Excel Programming 1 August 26th 03 04:46 PM


All times are GMT +1. The time now is 01:17 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"