Thanks Pete
I think I have still not explained my problem. In my previous attached file (4numbers.xls), the data populated under row number 3 is just a check to see the performance of my code in terms of percentage i.e., how much % of times the code is gone into second condition. I dont want that data. Numbers that comes in A1:D1 are the only four numbers that I want.
If you comment the For loop in my macro
and these following lines
the macro then will give only 4 numbers as an output. Now keep running this macro for 15-20 times by clicking on the blue run button that I made, you will see condition 1 is satisfied more than 75% of the times.
I want the code to output ONLY 4 numbers based on what is selected in F1. If I run the macro say 100 times, then 80% of the times, condition 1 should be true and rest 20% of the times condition 2 should be true. The distribution can vary +/- 5%. My macro is giving me the result what I want. The only thing was that the code is not written correctly.
About your file
1. The 100 results that the code performs, every set of numbers is not equal to 100. Whereas in my file, it is. I dont need these 100 sets.
2. I dont want to track any max value in G1
I added these four lines in the revised attached file to display my sample 100 sets in column P:S
Lets end here. I am sorry to have kept you busy with a module which i may have not explained properly. Sorry
Thank you for your support.
Bookmarks