ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   (Simple) VBA Question (https://www.excelbanter.com/excel-programming/274177-simple-vba-question.html)

Matt[_10_]

(Simple) VBA Question
 
I'm wanting to use VBA to change the goal seek function
from a fixed value e.g. 0.3 below to a variable - want to
put in a cell reference instead

Sheets("Calc Sheet").Select
Range("BJ23").Select
Range("BJ23").GoalSeek Goal:=0.3, ChangingCell:=Range
("BJ22")
Sheets("Header").Select

I have done this before so know it works, but for some
reason it's not working for me this time

Any help would be greatly appreciated
Matt


BrianB

(Simple) VBA Question
 
Goal:=Range("A1").Value

Regards
BrianB
---------------------------------------------


"Matt" wrote in message ...
I'm wanting to use VBA to change the goal seek function
from a fixed value e.g. 0.3 below to a variable - want to
put in a cell reference instead

Sheets("Calc Sheet").Select
Range("BJ23").Select
Range("BJ23").GoalSeek Goal:=0.3, ChangingCell:=Range
("BJ22")
Sheets("Header").Select

I have done this before so know it works, but for some
reason it's not working for me this time

Any help would be greatly appreciated
Matt


matt

(Simple) VBA Question
 
Thanks Brian


-----Original Message-----
Goal:=Range("A1").Value

Regards
BrianB
---------------------------------------------


"Matt" wrote in message

...
I'm wanting to use VBA to change the goal seek function
from a fixed value e.g. 0.3 below to a variable - want

to
put in a cell reference instead

Sheets("Calc Sheet").Select
Range("BJ23").Select
Range("BJ23").GoalSeek Goal:=0.3,

ChangingCell:=Range
("BJ22")
Sheets("Header").Select

I have done this before so know it works, but for some
reason it's not working for me this time

Any help would be greatly appreciated
Matt

.



All times are GMT +1. The time now is 05:23 PM.

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