Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macro to re-calcluate and count times run
I'm looking for a basic macro that re-calculates the formula in a
spreadsheet until a certain condition is met (i.e. a solution found, being a "yes" value in a particular cell) but counts the number of times it takes before that condition is met, and then stops recalculating and returns the result plus the number of times that the scenario had to be run before a solution was found. The expected number of attempts will probably be less than 20. Any suggestions? Thanks in advance Mike |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macro to re-calcluate and count times run
Mike
I'd try something like Do while conditions here count = count +1 code here loop msgbox count End sub and place this at the start of the loop -----Original Message----- I'm looking for a basic macro that re-calculates the formula in a spreadsheet until a certain condition is met (i.e. a solution found, being a "yes" value in a particular cell) but counts the number of times it takes before that condition is met, and then stops recalculating and returns the result plus the number of times that the scenario had to be run before a solution was found. The expected number of attempts will probably be less than 20. Any suggestions? Thanks in advance Mike . |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macro to re-calcluate and count times run
thanks
mike "Peter Atherton" wrote in message ... Mike I'd try something like Do while conditions here count = count +1 code here loop msgbox count End sub and place this at the start of the loop -----Original Message----- I'm looking for a basic macro that re-calculates the formula in a spreadsheet until a certain condition is met (i.e. a solution found, being a "yes" value in a particular cell) but counts the number of times it takes before that condition is met, and then stops recalculating and returns the result plus the number of times that the scenario had to be run before a solution was found. The expected number of attempts will probably be less than 20. Any suggestions? Thanks in advance Mike . |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Count how many times a phrase comes up? | Excel Worksheet Functions | |||
count text appear how many times & put in respec col??eg 1st times | Excel Discussion (Misc queries) | |||
I tried to get around the problem of the pivot table field settingdefaulting to Count instead of Sum by running a macro of change the settingfrom Count to Sum. However, when I tried to run the Macro, I got error messageof run time error 1004, unable | Excel Worksheet Functions | |||
I tried to get around the problem of the pivot table field settingdefaulting to Count instead of Sum by running a macro of change the settingfrom Count to Sum. However, when I tried to run the Macro, I got error messageof run time error 1004, unable | Excel Discussion (Misc queries) | |||
Can Excel calcluate miles between zip codes? | Excel Discussion (Misc queries) |