简体   繁体   English

固定的Excel公式(不取决于移动单元格)

[英]Fixed excel formula (not depending on moving cell)

In D2 cell I have a formula referring to D4 cell value. 在D2单元格中,我有一个引用D4单元格值的公式。

Then, I drag&drop D4 cell from D4 to C4, and my D2 cell formula changed. 然后,我将D4单元格从D4拖放到C4,然后更改了D2单元格的公式。

How to "hardcode" this marked reference to D4 (resulting in 0*2=0)? 如何“硬编码”对D4的标记引用(导致0 * 2 = 0)?

Is it possible to make it work without vba? 是否可以使它在没有vba的情况下工作?

尝试这个。

=indirect(address(4,4))*2

使用绝对引用,如..

=$D$4*2 

Since you aren't doing a vlookup to reference the data (Which is the problem I'm having), try using an INDEX with the limits of excel's table of cells as the braces to prevent it from moving, like this: 由于您没有执行vlookup引用数据(这是我遇到的问题),因此请尝试使用具有excel单元格表限制的INDEX作为括号来防止其移动,如下所示:

=(INDEX($1:$1048576,4,4))*2 =(INDEX($ 1:$ 1048576,4,4))* 2

That prevents the reference from moving. 这样可以防止参考移动。 =D = D

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM