Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Automatic iteration

Status
Not open for further replies.

Sinexus

Technical User
Dec 24, 2005
23
NO
I have a sheet in Excel that contains an equation which requires me to use the 'Goal seek' function everytime it needs solving. Is there a way to automate this so that the iteration process takes place automatically everytime a value associated with the equation is changed?
 
I would think you could do it in VBA. Something like:

(choose the right event to trigger it, first):
Code:
Sub WhateverEvent ()
  Dim x as Long 'x = Row
  Dim y as Long 'y = Column
  Dim strFormula as String
  Set strFormula = "=Goal Seek Formula Here"
  Cell(x,y).Formula = strFormula
End Sub

This code may not be exactly what you need, it's more or less the idea. I'm not sure off the top of my head as to what event you would use for it.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top