OK. I understand now. So now I have a follow-up question: what are you testing? The random number generator? How long it takes a random number generator to match a user-specified value? Isn't that, by definition, random? Are you trying to verify the "randomness" of the random number generator?
For your reset problem all you need to do is wire in to the
Reset input, but not the way you're doing it. You just need to check the iteration count and reset if i=0.
Unfortunately, I don't have the Office Toolkit, so I can't help with the Excel file issue.