rwilliams09
New Member
- Joined
- Jun 18, 2017
- Messages
- 48
I have the following VBA code, but I want to limit O22 at 0 because this is a breakeven analysis with multiple revenue-drivers. The idea is that if O22 is 0, then this is sufficient information. Those using the spreadsheet do not need to know that O22 can be "(999,999,999)" and still breakeven... if that makes sense.
How would I set the parameter at a minimum of 0? Also, would like to set it up in a way that makes it run fast so that it does not have to go through all of the iterations and then settle on 0.
Private Sub WellOilBreakeven_Click()
'
' GoalSeek Macro
'
'
Application.CutCopyMode = False
Application.CutCopyMode = False
Application.CutCopyMode = False
Range("D9").GoalSeek Goal:=0, ChangingCell:=Range("O22")
End Sub
Thank you so much in advance!
How would I set the parameter at a minimum of 0? Also, would like to set it up in a way that makes it run fast so that it does not have to go through all of the iterations and then settle on 0.
Private Sub WellOilBreakeven_Click()
'
' GoalSeek Macro
'
'
Application.CutCopyMode = False
Application.CutCopyMode = False
Application.CutCopyMode = False
Range("D9").GoalSeek Goal:=0, ChangingCell:=Range("O22")
End Sub
Thank you so much in advance!