Excel 2007获取公式不引用的单元格值
我有一张数值数据。我想将值乘以我可以更改的其他单元格中的缩放因子。我理想中想做的是这样的替换(只是一个例子):
22.85
变成 =(F$15*22.85)
我可以在脚本中轻松完成此操作,但是我宁愿留在 Excel 中。
我认为最简单的方法是制作一个类似 =(F$15*...)
的公式并将其拖出,但代替“...”我希望它能够单元格的值,而不是对其的引用。
这是因为我想替换单元格,因此像 =(F$15*L4)
这样的公式将位于单元格 L4 中并引用自身,这显然不起作用。
谢谢 :)
I have a sheet of numerical data. I want to multiply values by scaling factors which are in other cells that I can change. What I would ideally like to do is a substitution like such (just an example):
22.85
becomes =(F$15*22.85)
I could do this easily in a script but I'd rather just stay in Excel.
What I'm thinking would be easiest is to make a formula like =(F$15*...)
and drag it out, but in place of '...' I want it to just get the value of the cell, not a reference to it.
This is because I want to replace the cells, so a formula like =(F$15*L4)
would be in cell L4 and referencing itself, which obviously wouldn't work.
Thanks :)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
如果您要将一定范围内的所有数字乘以同一个数字(例如 22.85),您可以遵循此选择性粘贴过程。
假设 a1:a5 为:
然后将
22.85
放入 b1。选择 b1 中的 22.85 并按 Ctrl-C。然后选择范围a1:a5。从“主页”选项卡中,选择“粘贴”->“粘贴”。选择性粘贴...(或者,您可以右键单击该范围内的任何单元格并选择选择性粘贴...)
在选择性粘贴弹出窗口的操作区域中,选择乘法。所有数字都将乘以复制的数字 22.85。 a1:a5 就地相乘,变成:
If you are multiplying all the numbers in a range of by the same number, say 22.85, you may follow this Paste Special procedure.
Let's suppose that a1:a5 are:
Then you place
22.85
in b1.Select the 22.85 in b1 and press Ctrl-C. Then choose the range a1:a5. From the Home tab, choose Paste -> Paste Special... (Or, you may right click on any cell in the range and choose Paste Special...)
In the Operation area of the Paste Special popup, choose Multiply. All the numbers will be multiplied by the copied number, 22.85. a1:a5 were multiplied in place and became:
您可以创建第二列,然后隐藏原始列(右键单击列>隐藏列)
You could create a second column, and then hide the original column (right click column > hide column)