Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Running code on a list of variables

Thanks - I guess I should be more clear on what exactly I'm working
with. We have patients who will accumulate a higher risk of developing
the disease based on how much time we've been observing them. So for
example, someone who's been in the clinic for 1 year will have less of
a chance of developing the disease than someone who's been in the
clinic for 2 years. The way I've worked this out is like this:

1. Create a counter to count the number of days elapsed between the
start and end date of your observation period
2. Input a daily enrollment rate
3. Input a daily probability of developing a disease

So then we calculate how many people will get the disease in the
observation period like this:

On the first day of observation, number of cases = 1 (number of days
enrolled) * daily probability of disease * number people enrolled

But on the second day of observation, number of cases = 2 * daily
probability of disease * number of people enrolled so that the
probability becomes cululative.

I've done this using a VB do loop, and I basically want to run this
calculation for each disease without having to make a formula for
each, replacing the daily probability of disease for each disease.

Thanks in advance for any help!

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
how to prevent code running when in a worksheet code Corey Excel Programming 5 August 13th 06 08:52 AM
Using variables while running macro TheLeafs[_4_] Excel Programming 2 February 28th 06 02:47 PM
inserting variables in code???? westg Excel Programming 2 August 15th 05 01:00 PM
Running code from list Mick[_8_] Excel Programming 0 February 10th 05 07:10 PM
Variables in VB Code David M Excel Programming 1 January 23rd 05 10:08 PM


All times are GMT +1. The time now is 01:16 PM.

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

About Us

"It's about Microsoft Excel"