View Single Post
  #1   Report Post  
choboy
 
Posts: n/a
Default Goal Seek tool in a macro

You can use the formula:
Range("J7").GoalSeek Goal:=Range("J6"), ChangingCell:=Range("E6")
Hope that helps.
-Bill

"Daniel Roy" wrote:

Hi there

I am sure I will ask an obvious question, but your help is gonna be
much appreciated.

Every day I input a sery of new prices into a spreadsheet in cells J6,
J9 and so on untill J24.

Then I have to use the goal seek tool to set cells J7, J10 and so on
untill J25 to value of cell J6, J9... J24 by changing cells E6,
E7...E12 on another sheet.

I am confident there is a clever way to do this. I have tried to setup
with a simple macro as

Range("J6").Select
Range("J7").GoalSeek Goal:=104,
ChangingCell:=Sheets("Info").Range("E6")
End Sub

Unfortunately, Range("J7").GoalSeek Goal:=104 is an imperfect
information as tomorrow I may enter 115 as the new price. And I cannot
define something as
Range("J7").GoalSeek Goal:=J6

Any help would be more than appreciated, perhaps on my mailbox


Best regards
Daniel Roy