View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
[email protected] kwaldman@gmail.com is offline
external usenet poster
 
Posts: 2
Default Running code on a list of variables

Hi all,
I'm very new to VB for Excel and could use some help from experienced
users. I have a worksheet that contains the probability for developing
20 different diseases. If I know how many people are in my population,
I want to determine how many of those people will develop each
disease. Basically, I want to write one formula with a variable that
can be changed depending on the disease, for example, Num(disease) =
probability(disease) * people. The key is that I want to say something
like "run this code for my list of 20 diseases, replacing the word
'disease' above with the name of each disease.

Does this make sense, and is it easily done in VB?

Thanks very much.