Goal Seek VBA Help

howiwonder

New Member
Joined
Jul 29, 2014
Messages
4
Hello --

I am trying to set up a goal seek macro with the following specs:

individual goal seeks needed, for each column

I need to set cell c13 to 0 by changing cell c14, and then set d13 to 0 by changing d14, etc. through to column GE.

Can you help?

Thank you!
 

Rhodie72

Well-known Member
Joined
Apr 18, 2016
Messages
546
Hello --

I am trying to set up a goal seek macro with the following specs:

individual goal seeks needed, for each column

I need to set cell c13 to 0 by changing cell c14, and then set d13 to 0 by changing d14, etc. through to column GE.

Can you help?

Thank you!
Goal seek is part of the Excel Add-ins that Ship with every version after Excel 2007. writing a goal seek would be re-inventing the wheel.
 

howiwonder

New Member
Joined
Jul 29, 2014
Messages
4
Goal seek is part of the Excel Add-ins that Ship with every version after Excel 2007. writing a goal seek would be re-inventing the wheel.
Yes, but what you're proposing requires 185 iterations of goal seek. I am trying to find a vba solution that runs the goal seek in sequence. Please advise, thank you!
 

shg

MrExcel MVP
Joined
May 7, 2008
Messages
21,713
Office Version
2010
Platform
Windows
Maybe ...

Code:
Sub hw()
  Dim cell As Range
  
  For Each cell In Range("C13:GE13").Cells
    cell.GoalSeek Goal:=0, ChangingCell:=cell.Offset(1)
  Next cell
End Sub
 

shg

MrExcel MVP
Joined
May 7, 2008
Messages
21,713
Office Version
2010
Platform
Windows
You're welcome.
 

Forum statistics

Threads
1,081,578
Messages
5,359,736
Members
400,545
Latest member
Damntheman30

Some videos you may like

This Week's Hot Topics

  • VBA (Userform)
    Hi All, I just would like to know why my code isn't working. Here is my VBA code: [CODE=vba]Private Sub OKButton_Click() Dim i As Integer...
  • List box that changes fill color
    Hello, I have gone through so many pages trying to figure this out. I have a 2020 calendar that depending on the day needs to have a certain...
  • Remove duplicates and retain one. Cross-linked cases
    Hi all I ran out of google keywords to use and still couldn't find a reference how to achieve the results of a single count. It would be great if...
  • VBA Copy and Paste With Duplicates
    Hello All, I'm in need of some input. My VBA skills are sub-par at best. I've assembled this code from basic research and it works but is...
  • Macro
    is it possible for a macro to run if the active cell value is different to the value above it
  • IF DATE and TIME
    I currently use this to check if date has passed but i also need to set a time on it too. Is it possible? [CODE=vba]=IF(B:B>TODAY(),"Not...
Top