How do I set a goalseek value via an input box using vba macro

G

Guest

code = Range("J22").GoalSeek Goal:=myNum = Application.InputBox("Enter a
number"), ChangingCell:=Range("C5")
The input box will fire up but will not use the input value as the value
in the goalseek calc.
 
G

Guest

Sub Macro2()
x = Application.InputBox("give me a goal")
Range("C5").GoalSeek Goal:=x, ChangingCell:=Range("A1")
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