![]() |
How do I set a goalseek value via an input box using vba macro
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. |
How do I set a goalseek value via an input box using vba macro
Sub Macro2()
x = Application.InputBox("give me a goal") Range("C5").GoalSeek Goal:=x, ChangingCell:=Range("A1") End Sub -- Gary''s Student - gsnu200739 "TJK" wrote: 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. |
All times are GMT +1. The time now is 01:47 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com