简体   繁体   English

MS Excel自动更改单元格变量

[英]MS Excel automatically changes cell variables

I'm using the formula 我正在使用公式
=Lookup(B2,Sheet2:D2:Sheet2:D9,Sheet2:A2:Sheet2:D9)
to search the value of B column in current Sheet in Sheet2's D column and then return the value of Sheet2's A column in the same row. 在Sheet2的D列中搜索当前Sheet中的B列的值,然后在同一行中返回Sheet2的A列的值。 When I expand lower corner of the cell to autofill 500 cells vertically, I see Excel has incremented B2:B500 as well as D2,D9,A2,A9 (those of Sheet2) as well. 当我扩展单元格的下角以垂直自动填充500个单元格时,我看到Excel增加了B2:B500以及D2,D9,A2,A9(Sheet2的那些)。 I don't want the latter to happen. 我不希望后者发生。 In fact I want Excel NOT TO CHANGE D2,D9,A2,A9 in the formula. 实际上,我希望Excel在公式中不要更改 D2,D9,A2,A9。
What can I do? 我能做什么?

Your problem is to do with the difference between relative and absolute references. 您的问题是相对引用和绝对引用之间的区别。

Relative references change when you copy a formula from one cell to another. 将公式从一个单元格复制到另一个单元格时,相对引用会更改。 If you enter =A1 in B1 and copy it to B2 it will now be =A2 . 如果在B1中输入=A1并将其复制到B2,则现在将为=A2

Absolute references don't change when you copy them. 复制绝对引用时,它们不会发生变化。 Enter =$A$1 in B2, then copy it to B2 and it will still be =$A$1 在B2中输入=$A$1 ,然后将其复制到B2中,它将仍然是=$A$1

A "$" before the column reference anchors the column. 列引用之前的“ $”锚定列。 A "$" before the row reference anchors the row. 行引用之前的“ $”锚定该行。 A $ before both anchors a specific cell. 在两个锚定特定单元格之前的$。

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

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