Thread: Vba goal seek
View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
csw78 csw78 is offline
external usenet poster
 
Posts: 1
Default Vba goal seek


Hi. My intent is to find the value in Range("C1") when "AperC"="BperD".
"BperD" turns out to be an invalid qualifier for goal seek. I was
wondering if anyone know of a work around. Thank you much.
---------------------------------------------------------------
Private Sub Worksheet_Calculate()
Dim AperC as Double
Dim BperD as Double

AperC = Range("A1")^2 / 10
BperD = Range("B1")^3+Range("C1")

On Error GoTo TheEnd
Application.EnableEvents = False

Do Until AperC=BperD
BperD.GoalSeek Goal:=AperC, _
ChangingCell:=Range("C1")
Loop

TheEnd:
Application.EnableEvents = True
End Sub


--
csw78
------------------------------------------------------------------------
csw78's Profile: http://www.excelforum.com/member.php...o&userid=23008
View this thread: http://www.excelforum.com/showthread...hreadid=376747