M
Mozman
Hi all-
I have a problem where (for reasons I won't go into) I have an array
with zero values (the zeros need to be there). I want to resample
(with replacement) from the array to generate a new array, but if a
zero is picked I want to disregard it and pick again until I have a new
array that consists of non-zero values from the first array.
I can do this with a series of nested IF() statements. However, I am
doing this procedure sequentially many thousands of times and even with
10 worksheet pages of nested IF() statements many times a zero gets
through. This, for various reasons, messes up my simulation.
What I need is a simple way to tell excel to keep picking numbers with
replacement from an array until a non-zero value is obtained.
Any help will be greatly appreciated.
Thanks,
MM
I have a problem where (for reasons I won't go into) I have an array
with zero values (the zeros need to be there). I want to resample
(with replacement) from the array to generate a new array, but if a
zero is picked I want to disregard it and pick again until I have a new
array that consists of non-zero values from the first array.
I can do this with a series of nested IF() statements. However, I am
doing this procedure sequentially many thousands of times and even with
10 worksheet pages of nested IF() statements many times a zero gets
through. This, for various reasons, messes up my simulation.
What I need is a simple way to tell excel to keep picking numbers with
replacement from an array until a non-zero value is obtained.
Any help will be greatly appreciated.
Thanks,
MM