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

vba goal seek

ResolvedVersion 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:

Repeating headings on spreadsheets that print on more than one page

By default when you print a spreadsheet out and it prints on more than one page, the headings at the top and the side of the spreadsheet don't appear on all the pages following page 1.

To get Excel to repeat headings on all pages when printing, go to File - Page Setup - Sheet, then select the rows to repeat at the top of pages, and the columns to repeat at the side of pages by clicking on the red arrows at the right side of the two boxes under the 'Print titles' area. Then click OK.

If you view your spreadsheet in Print Preview, you should see the headings being repeated on each page.

View all Excel hints and tips

Connect with us:

0207 987 3777

Call for assistance

Request Callback

We will call you back

Server loaded in 0.09 secs.