In this article, we have used a Goal Seek Goal Seek in Excel using VBA to get required minimum sales to meet the Sales % target using VBA. You can use this method for other purpose also.
Input your number in left table and yellow highlighted field and click on Get Minimum Sales button.
Goal Seek in Excel using VBA
Watch this step by step video to Goal Seek using VBA-
Below is the macro code –
Option Explicit Sub Goal_Seek() Dim sh As Worksheet Set sh = ThisWorkbook.Sheets("Goal Seek") sh.Range("K13").GoalSeek goal:=sh.Range("E5").Value, changingcell:=sh.Range("G10") sh.Range("G10").NumberFormat = "0" End Sub
Visit our YouTube channel to learn step-by-step video tutorials