Macro for goal seek value input

z71dawg101

New Member
Joined
Apr 15, 2013
Messages
1
Hello,

I need help with creating a macro and a button for an excel worksheet. I need the To Value in goal seek to be a specific cell, as in when the cell changes value I do not have to go to goal seek and change the value every time. I have no clue how to write a macro to do this. Any help would be appreciated!

Thanks!!!!!

Please comment on this thread if you are interested in helping and I can email you the spreadsheet.


I need the assumed real increase in contribution each year to be the by changing cell in goal seek, and cell K48 is the value. the set cell is k48
 

Excel Facts

Formula for Yesterday
Name Manager, New Name. Yesterday =TODAY()-1. OK. Then, use =YESTERDAY in any cell. Tomorrow could be =TODAY()+1.
Welcome to the board.
I'm a little confused by which cells you want to use for what in Goal Seek so I created a macro using the following:
The "Set Cell" is A5
"To Value" is cell B1
"By Changing" is cell A4

Following is the Macro code
Code:
Sub Goal_Seek()
'
' Goal_Seek Macro
'

'
    Range("A5").GoalSeek Goal:=Range("B1"), ChangingCell:=Range("A4")
End Sub
 
Upvote 0
I was a little brief in my response last night. If you need help getting the proper cells into Goal Seek or if you want to use a Command Button to invoke Goal Seek just respond and I will try to help you with that.
 
Upvote 0

Forum statistics

Threads
1,203,460
Messages
6,055,557
Members
444,797
Latest member
18ecooley

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top