作者:dmcm0006 | 来源:互联网 | 2023-05-18 23:56
I'm grasping at straws here, so any help would be great (ie. I have no idea what I'm doing with VBA).
我在这里抓住稻草,所以任何帮助都会很棒(也就是说,我不知道我在用VBA做什么)。
I'm trying to solve a circular reference problem in Excel by creating a goal seek macro - basically
我试图通过创建目标搜索宏来解决Excel中的循环引用问题 - 基本上
S3 = M + S2
,
S3 = M + S2,
S3 = L * G
.
S3 = L * G.
I want to goal seek S3 to equal L * G
by changing M.
我想通过改变目标来寻求S3等于L * G.
So, I've put
所以,我已经把
L * G
in cell H32
,
细胞H32中的L * G,
S3
in H18
,
在H18的S3,
M
in G18
,
G18中的M,
S2
in F18
在F18中的S2
and this is what I've gathered so far.
这是我迄今为止收集的内容。
Sub GoalSeek()
Dim x As Integer
x = Range("H32").Value
Range("H18").GoalSeek Goal:=x, ChangingCell:=Range("G18")
End Sub
I'm getting a "Reference is not valid" error, ideas? Thanks!
我有一个“参考无效”的错误,想法?谢谢!
2 个解决方案