Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Looping through valid inputs (VBA)
How to write a simple program to:
Test all possible combinations of adding two numbers that range from 1-100 each (10,000 total possible combination) using some sort of looping structure. My guess (and I'm new at programming) is that there will be some sort of nested loops but the logic escapes me. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Looping through valid inputs (VBA)
Not sure what you want to test but
for N = 1 to 100 for M = 1 to 100 'perform test next next will give you the loop structure you want. wrote: How to write a simple program to: Test all possible combinations of adding two numbers that range from 1-100 each (10,000 total possible combination) using some sort of looping structure. My guess (and I'm new at programming) is that there will be some sort of nested loops but the logic escapes me. |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Looping through valid inputs (VBA)
DS's solution is for those who don't trust the system.
Bob Phillips is for those with faith in something as well established as For Next loops to actually work. You could combine the two in your MsgBox output to compare the values computed by each method. "DesireeStar" wrote: Heh, yeah. I mean to produce an actual number as to how many times it looped total. Ie: MsgBox "This looped " + loopCountTotal + " times" |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Quarterly inputs | Excel Worksheet Functions | |||
custom inputs | Excel Discussion (Misc queries) | |||
A question of two inputs | Excel Worksheet Functions | |||
Inputs. | Excel Programming | |||
Help with Date Inputs | Excel Programming |