Revise Macro from Worksheet

T

tx12345

Hi

I have this bit of code which for the most part is pretty handy:

Sub ABC()
Range("ah11").Formula = Range("AH17").Text
Do Until Range("AH27").Value = "5"
Application.Run "newset"
Loop
End Sub

AH17 is where I tinker with a formula, then run a test, and so on,
until the value at AH27 gets to 5, where I find 5 instances of what I
am looking for, then it stops. It is nice to be able in this way to
revise the formula from the spreadsheet without having to dig into the
macro directly.

But I have not been able to figure out a way to revise the "5" from the
worksheet. Sometimes I want to run 10 tests, or just 3, etc, but each
time I have to dig into the macro to make the revision.

Is there a way to update the value at "5" above from the worksheet?

Many thanks

tx
 
T

Tom Ogilvy

Put 5 in AI17. Or change AI17 to some cell you are not using.

Sub ABC()
Range("ah11").Formula = Range("AH17").Text
Do Until Range("AH27").Value = Range("AI17").Value
Application.Run "newset"
Loop
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top