I need help in understanding what this macro does...
I am novice to this. Please help meCode:Sub DoGoalSeek()' ' DoGoalSeek Macro ' Macro recorded 19/04/2011 by glittle ' ' Range("B4").Select ActiveCell.FormulaR1C1 = "5" ActiveSheet.Calculate Range("E30").Select Range("E30").GoalSeek Goal:=0, ChangingCell:=Range("B4") End Sub
It:
Based on what I can see here, I'd assume that E30 has a formula that uses B4 as an input. Why it puts a 5 in the cell is beyond me, though, as the value will just get overwritten when the goalseek is triggered.
- It puts a 5 in cell B4
- It recalculates the worksheet
- It changes E30 to 0 by changing the value in B4
Hope that helps,
Ken Puls, FCPA, FCMA, MS MVP
Learn to Master Your Data at the Power Query Academy (the world's most comprehensive online Power Query training), with my book M is for Data Monkey, or our new Power Query Recipe cards!
Main Site: http://www.excelguru.ca -||- Blog: http://www.excelguru.ca/blog -||- Forums: http://www.excelguru.ca/forums
Check out the Excelguru Facebook Fan Page -||- Follow Me on Twitter
If you've been given VBA code (a macro) for your solution, but don't know where to put it, CLICK HERE.
Bookmarks