我设定了一个目标,使用宏观计算销售价格的盈亏平衡,将目标利润设定为1000美元。我现在想知道我是否可以更改我的vba代码,如果我将设置的目标利润(目标值)从1000更改为200 (或任何数字),它将更新盈亏平衡价格。
将单元格值更改为1000 c12 (我在goal seek选项卡中手动输入)
Sub FindBreakEven()
'
' FindBreakEven Macro
'
Range("E12").GoalSeek Goal:=1000, ChangingCell:=Range("B5")
End Sub发布于 2021-09-02 07:10:06
试试这个:
Sub FindBreakEven()
'
' FindBreakEven Macro
'
Range("E12").GoalSeek Goal:=Range("B6"), ChangingCell:=Range("B5")
End Subhttps://stackoverflow.com/questions/39680443
复制相似问题