vba goal seek

Public Schedule Face-to-Face & Online Instructor-Led Training - View dates & book

Forum home » Delegate support and help forum » Microsoft Excel VBA Training and help » VBA Goal Seek

VBA Goal Seek

resolvedResolved · High Priority · Version 2003

Kerry has attended:
Excel Advanced course

VBA Goal Seek

Hi,

I'm hoping someone can help me. I've written a basic goal seek macro but what i need to be able to do is save the value of the cell that is being changed before the goal seek is applied (variable x in the example below). In the next stage of this program, I need to be able to use the difference between this value pre and post goal seek but can only do this if the macro can recognise the value of this variable before it is changed during the goal seek function.

So far my macro reads as follows:


Sub MaxHedgeRate()

Application.ScreenUpdating = False

Set x = Range("LoanMargin")
Set y = Range("ICRCovenant")
Set z = Range("MinICR")

z.GoalSeek Goal:=y, ChangingCell:=x

End Sub

Any help would be greatly appreciated.

Thanks,

Kerry

RE: VBA Goal Seek

Hi Kerry

Thanks for your post, one of our VBA trainers has reviewed your request and as it does fall outside the scope of this forum are 2 options to resolve this.

Option 1: Quick fix; you send us your working files for our review and we can confirm if we can create a solution, bear in mind one of us may need to take some time to achieve this so there might be a related cost. We will notify you if there will be and you can decide if you wish to proceed.

Option 2: Learn how to create a solution yourself for this particular case and others by attending our 2 day Excel VBA introduction course, please click here for more information.

regards

Jacob

 

Training courses

 

Training information:

Welcome. Please choose your application (eg. Excel) and then post your question.

Our Microsoft Qualified trainers will then respond within 24 hours (working days).

Frequently Asked Questions
What does 'Resolved' mean?

Any suggestions, questions or comments? Please post in the Improve the forum thread.


 

Excel tip:

LARGE and SMALL functions and their uses

Two of Excel's most common functions are the MAX and MIN functions which will display the largest (MAX) or smallest (MIN) value in a series. What if you need the 2nd or 3rd largest or smallest values instead of the largest or smallest?

The =LARGE(array,n) returns the nth largest value of a series.

The =SMALL(array,n) function returns the nth smallest value of a series.

In both functions, 'n' represents the order of the number you want to display. For example, putting in 2 as n will give you the second highest number; putting in 3 as n will give you the third highest number.

View all Excel hints and tips


Server loaded in 0.07 secs.