ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Goal Seeking to a Cell instead of a hard number (https://www.excelbanter.com/excel-discussion-misc-queries/152550-goal-seeking-cell-instead-hard-number.html)

Nate

Goal Seeking to a Cell instead of a hard number
 
I am trying to goal seek to a specific cell. Is it possible to do so without
typing in a hard number?

Bernie Deitrick

Goal Seeking to a Cell instead of a hard number
 
Nate.

You would need to use code:

Sub NateGoalSeek()
Range("A3").GoalSeek Goal:=Range("A2").Value, ChangingCell:=Range("A1")
End Sub

In this example, we are seeking to set the value returned by the formula in cell A3 equal to the
value entered in cell A2 by changing cell A1 (all of the activesheet).

HTH,
Bernie
MS Excel MVP


"nate" wrote in message
...
I am trying to goal seek to a specific cell. Is it possible to do so without
typing in a hard number?





All times are GMT +1. The time now is 06:48 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com