Hi,
Thanks in advance for any help. I have a reasonably complex VBA simulation that I am trying to modify. It is supposed to be modelling movements from one region to another.
I have a variable, "Region", which can be anything from 1-5. I need a function that will change this variable to 1-5 based on probabilities that I pass it.
e.g. If Region is currently 1, there is a 20% chance it will become a 2, and 10% chance it will become a 3, a 50% chance a 4 etc.
I know you can do similar things to this in excel using array formulas but was wondering if there was a way to do it in VBA because the regions / probabilities will be changing so I need to pass them to the function using an array.
Hope this makes sense,
Cheers
Gareth
Bookmarks