I think the main issue is that you are using iteration instead of recursion. If I have time I'll post up a sample that'll help you fix it.
Thank you for your reply schalk and KieranJones1.
Yes, the above was a quick and dirty copy/paste job. I'm familiar with recursion but just feel like paying someone else to do this at the moment rather than spend time on it. As the issue involves my own personal money, I feel too emotionally involved to want to code this myself right now.
I've tried 2048 combinations with no luck, but need a more solid solution that will help me test about 8 or 16m.
Again, anyone able to provide me with a complete solution (rather than just coding help) will be well rewarded.